{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "c7af1919",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "#  19\\.  决策树实现与应用  # \n",
    "\n",
    "##  19.1.  介绍  # \n",
    "\n",
    "决策树是机器学习中简单又经典的算法，本次实验将带领大家学习决策树的原理，通过代码详细了解决策分类的特征选择，通过 Python 实现决策树的算法流程，并学习使用 scikit-learn 构建决策树模型，最后使用该模型对真实数据进行分类预测。 \n",
    "\n",
    "##  19.2.  知识点  # \n",
    "\n",
    "  * 决策树算法原理 \n",
    "\n",
    "  * 信息增益 \n",
    "\n",
    "  * 决策树算法实现 \n",
    "\n",
    "  * 学生成绩分类预测 \n",
    "\n",
    "  * 决策树可视化 \n",
    "\n",
    "##  19.3.  什么是决策树  # \n",
    "\n",
    "决策树是一种特殊的树形结构，一般由节点和有向边组成。其中，节点表示特征、属性或者一个类，而有向边包含判断条件。决策树从根节点开始延伸，经过不同的判断条件后，到达不同的子节点。而上层子节点又可以作为父节点被进一步划分为下层子节点。一般情况下，我们从根节点输入数据，经过多次判断后，这些数据就会被分为不同的类别。这就构成了一颗简单的分类决策树。 \n",
    "\n",
    "举一个通俗的例子，假设工作多年仍然单身的小楼和他母亲在给他介绍对象时的一段对话： \n",
    "\n",
    "> 母亲：小楼，你都 28 了还是单身，明天亲戚家要来个姑娘要不要去见见。   \n",
    ">  小楼：多大年纪？   \n",
    ">  母亲：26。   \n",
    ">  小楼：有多高？   \n",
    ">  母亲：165厘米。   \n",
    ">  小楼：长的好看不。   \n",
    ">  母亲：还行，比较朴素。   \n",
    ">  小楼：温柔不？ 母亲：看起来挺温柔的，很有礼貌。 小楼：好，去见见。 \n",
    "\n",
    "作为程序员的小楼的思考逻辑就是典型的决策树分类逻辑，将年龄，身高，长相，是否温柔作为特征，并最后对见或者不见进行决策。其决策逻辑如图所示： \n",
    "\n",
    "[ ![https://cdn.aibydoing.com/aibydoing/images/document-uid214893labid6671timestamp1531711818867.png](https://cdn.aibydoing.com/aibydoing/images/document-uid214893labid6671timestamp1531711818867.png) ](https://cdn.aibydoing.com/aibydoing/images/document-uid214893labid6671timestamp1531711818867.png)\n",
    "\n",
    "##  19.4.  决策树算法原理  # \n",
    "\n",
    "其实决策树算法如同上面场景一样，其思想非常容易理解，具体的算法流程为： \n",
    "\n",
    "  1. 数据准备 → 通过数据清洗和数据处理，将数据整理为没有缺省值的向量。 \n",
    "\n",
    "  2. 寻找最佳特征 → 遍历每个特征的每一种划分方式，找到最好的划分特征。 \n",
    "\n",
    "  3. 生成分支 → 划分成两个或多个节点。 \n",
    "\n",
    "  4. 生成决策树 → 对分裂后的节点分别继续执行 2-3 步，直到每个节点只有一种类别。 \n",
    "\n",
    "  5. 决策分类 → 根据训练决策树模型，将预测数据进行分类。 \n",
    "\n",
    "下面我们依照决策树的算法流程，用 Python 来实现决策树构建和分类。首先生成一组数据，数据包含两个类别 man 和 woman，特征分别为：hair（头发长短），voice（声音粗细），height（身高），ear_stud（是否带有耳钉）。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "55099508",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "\n",
    "def create_data():\n",
    "    # 生成示例数据\n",
    "    data_value = np.array(\n",
    "        [\n",
    "            [\"long\", \"thick\", 175, \"no\", \"man\"],\n",
    "            [\"short\", \"medium\", 168, \"no\", \"man\"],\n",
    "            [\"short\", \"thin\", 178, \"yes\", \"man\"],\n",
    "            [\"short\", \"thick\", 172, \"no\", \"man\"],\n",
    "            [\"long\", \"medium\", 163, \"no\", \"man\"],\n",
    "            [\"short\", \"thick\", 180, \"no\", \"man\"],\n",
    "            [\"long\", \"thick\", 173, \"yes\", \"man\"],\n",
    "            [\"short\", \"thin\", 174, \"no\", \"man\"],\n",
    "            [\"long\", \"thin\", 164, \"yes\", \"woman\"],\n",
    "            [\"long\", \"medium\", 158, \"yes\", \"woman\"],\n",
    "            [\"long\", \"thick\", 161, \"yes\", \"woman\"],\n",
    "            [\"short\", \"thin\", 166, \"yes\", \"woman\"],\n",
    "            [\"long\", \"thin\", 158, \"no\", \"woman\"],\n",
    "            [\"short\", \"medium\", 163, \"no\", \"woman\"],\n",
    "            [\"long\", \"thick\", 161, \"yes\", \"woman\"],\n",
    "            [\"long\", \"thin\", 164, \"no\", \"woman\"],\n",
    "            [\"short\", \"medium\", 172, \"yes\", \"woman\"],\n",
    "        ]\n",
    "    )\n",
    "    columns = np.array([\"hair\", \"voice\", \"height\", \"ear_stud\", \"labels\"])\n",
    "    data = pd.DataFrame(data_value.reshape(17, 5), columns=columns)\n",
    "    return data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b4b0f92c",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "在创建好数据之后，加载并打印出这些数据 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "53c5ce7f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>hair</th>\n",
       "      <th>voice</th>\n",
       "      <th>height</th>\n",
       "      <th>ear_stud</th>\n",
       "      <th>labels</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>long</td>\n",
       "      <td>thick</td>\n",
       "      <td>175</td>\n",
       "      <td>no</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>short</td>\n",
       "      <td>medium</td>\n",
       "      <td>168</td>\n",
       "      <td>no</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>short</td>\n",
       "      <td>thin</td>\n",
       "      <td>178</td>\n",
       "      <td>yes</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>short</td>\n",
       "      <td>thick</td>\n",
       "      <td>172</td>\n",
       "      <td>no</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>long</td>\n",
       "      <td>medium</td>\n",
       "      <td>163</td>\n",
       "      <td>no</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>short</td>\n",
       "      <td>thick</td>\n",
       "      <td>180</td>\n",
       "      <td>no</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>long</td>\n",
       "      <td>thick</td>\n",
       "      <td>173</td>\n",
       "      <td>yes</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>short</td>\n",
       "      <td>thin</td>\n",
       "      <td>174</td>\n",
       "      <td>no</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>long</td>\n",
       "      <td>thin</td>\n",
       "      <td>164</td>\n",
       "      <td>yes</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>long</td>\n",
       "      <td>medium</td>\n",
       "      <td>158</td>\n",
       "      <td>yes</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>long</td>\n",
       "      <td>thick</td>\n",
       "      <td>161</td>\n",
       "      <td>yes</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>short</td>\n",
       "      <td>thin</td>\n",
       "      <td>166</td>\n",
       "      <td>yes</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>long</td>\n",
       "      <td>thin</td>\n",
       "      <td>158</td>\n",
       "      <td>no</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>short</td>\n",
       "      <td>medium</td>\n",
       "      <td>163</td>\n",
       "      <td>no</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>long</td>\n",
       "      <td>thick</td>\n",
       "      <td>161</td>\n",
       "      <td>yes</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>long</td>\n",
       "      <td>thin</td>\n",
       "      <td>164</td>\n",
       "      <td>no</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>short</td>\n",
       "      <td>medium</td>\n",
       "      <td>172</td>\n",
       "      <td>yes</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     hair   voice height ear_stud labels\n",
       "0    long   thick    175       no    man\n",
       "1   short  medium    168       no    man\n",
       "2   short    thin    178      yes    man\n",
       "3   short   thick    172       no    man\n",
       "4    long  medium    163       no    man\n",
       "5   short   thick    180       no    man\n",
       "6    long   thick    173      yes    man\n",
       "7   short    thin    174       no    man\n",
       "8    long    thin    164      yes  woman\n",
       "9    long  medium    158      yes  woman\n",
       "10   long   thick    161      yes  woman\n",
       "11  short    thin    166      yes  woman\n",
       "12   long    thin    158       no  woman\n",
       "13  short  medium    163       no  woman\n",
       "14   long   thick    161      yes  woman\n",
       "15   long    thin    164       no  woman\n",
       "16  short  medium    172      yes  woman"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data = create_data()\n",
    "data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "5e08f6f5",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "|  hair  |  voice  |  height  |  ear_stud  |  labels   \n",
    "---|---|---|---|---|---  \n",
    "0  |  long  |  thick  |  175  |  no  |  man   \n",
    "1  |  short  |  medium  |  168  |  no  |  man   \n",
    "2  |  short  |  thin  |  178  |  yes  |  man   \n",
    "3  |  short  |  thick  |  172  |  no  |  man   \n",
    "4  |  long  |  medium  |  163  |  no  |  man   \n",
    "5  |  short  |  thick  |  180  |  no  |  man   \n",
    "6  |  long  |  thick  |  173  |  yes  |  man   \n",
    "7  |  short  |  thin  |  174  |  no  |  man   \n",
    "8  |  long  |  thin  |  164  |  yes  |  woman   \n",
    "9  |  long  |  medium  |  158  |  yes  |  woman   \n",
    "10  |  long  |  thick  |  161  |  yes  |  woman   \n",
    "11  |  short  |  thin  |  166  |  yes  |  woman   \n",
    "12  |  long  |  thin  |  158  |  no  |  woman   \n",
    "13  |  short  |  medium  |  163  |  no  |  woman   \n",
    "14  |  long  |  thick  |  161  |  yes  |  woman   \n",
    "15  |  long  |  thin  |  164  |  no  |  woman   \n",
    "16  |  short  |  medium  |  172  |  yes  |  woman   \n",
    "  \n",
    "在得到数据后，根据算法流程，接下来需要寻找最优的划分特征，随着划分的不断进行，我们尽可能的将划分的分支所包含的样本归于同一类别，即结点的「纯度」越来越高。而常用的特征划分方式为信息增益和增益率。 \n",
    "\n",
    "##  19.5.  信息增益（ID3）  # \n",
    "\n",
    "在介绍信息增益之前，先引入「信息熵」的概念。信息熵是度量样本纯度最常用的一种指标，其公式为： \n",
    "\n",
    "$$ \\operatorname{Ent}(\\operatorname{D})=-\\sum_{k=1}^{\\left |y \\right |}p_{k}\\; log_{2}p_{k} \\tag{1} $$ \n",
    "\n",
    "其中  $\\operatorname{D}$  表示样本集合，  $p_{k}$  表示第  $k$  类样本所占的比例。其中  $\\operatorname{Ent}(\\operatorname{D})$  的值越小，则  $\\operatorname{D}$  的纯度越高。根据以上数据，在计算数据集的信息熵时，  $\\left | y \\right |$  显然只有 man，woman 共 2 种，其中为 man 的概率为  $\\frac{8}{17}$  ， woman 的概率为  $\\frac{9}{17}$  ，则根据公式  $(1)$  得到数据集的纯度为： \n",
    "\n",
    "$$ \\operatorname{Ent}(\\operatorname{data})=-\\sum_{k=1}^{2}p_{k}\\;log_{2}p_{k}=-(\\frac{8}{17}log_{2}\\frac{8}{17}+\\frac{9}{17}log_{2}\\frac{9}{17})=0.9975 $$ \n",
    "\n",
    "接下来，定义计算信息熵的函数。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "59237c26",
   "metadata": {},
   "outputs": [],
   "source": [
    "import math\n",
    "\n",
    "def get_Ent(data):\n",
    "    \"\"\"\n",
    "    参数:\n",
    "    data -- 数据集\n",
    "\n",
    "    返回:\n",
    "    Ent -- 信息熵\n",
    "    \"\"\"\n",
    "    # 计算信息熵\n",
    "    num_sample = len(data)  # 样本个数\n",
    "    label_counts = {}  # 初始化标签统计字典\n",
    "    for i in range(num_sample):\n",
    "        each_data = data.iloc[i, :]\n",
    "        current_label = each_data[\"labels\"]  # 得到当前元素的标签（label）\n",
    "\n",
    "        # 如果标签不在当前字典中，添加该类标签并初始化 value=0,否则该类标签 value+1\n",
    "        if current_label not in label_counts.keys():\n",
    "            label_counts[current_label] = 0\n",
    "        label_counts[current_label] += 1\n",
    "    # print(f\"label_counts={label_counts}, num_sample={num_sample}\")  # 打印标签统计字典\n",
    "    Ent = 0.0  # 初始化信息熵\n",
    "    for key in label_counts:\n",
    "        prob = float(label_counts[key]) / num_sample\n",
    "        Ent -= prob * math.log(prob, 2)  # 应用信息熵公式计算信息熵\n",
    "    return Ent"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c4786773",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "通过计算信息熵函数，计算根节点的信息熵： "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "2a7b7e8c",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.9975025463691153"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "base_ent = get_Ent(data)\n",
    "base_ent"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fcb4c45d",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "信息增益 就是建立在信息熵的基础上，在离散特征  $x$  有  $M$  个取值，如果用  $x$  对样本  $\\operatorname{D}$  来进行划分，就会产生  $M$  个分支，其中第  $m$  个分支包含了集合  $\\operatorname{D}$  的所有在特征  $x$  上取值为  $m$  的样本，记为  $\\operatorname{D}^{m}$  （例如：根据以上生成数据，如果我们用 hair 进行划分，则会产生 long，short 两个分支，每一个分支中分别包含了整个集合中属于 long 或者 short 的数据）。 \n",
    "\n",
    "考虑到不同分支节点包含样本数不同，给分支赋予权重  $\\frac{\\left | \\operatorname{D}^{m}\\right |}{\\left | \\operatorname{D} \\right |}$  ，使得样本越多的分支节点影响越大，则 信息增益 的公式就可以得到： \n",
    "\n",
    "$$ \\operatorname{Gain}(\\operatorname{D},x)=\\operatorname{Ent}(\\operatorname{D})- \\sum_{m=1}^{M}\\frac{\\left | \\operatorname{D}^{m}\\right |}{\\left | \\operatorname{D} \\right |}\\operatorname{Ent}(\\operatorname{D}^{m}) \\tag{2} $$ \n",
    "\n",
    "一般情况下，信息增益越大，则说明用  $x$  来划分样本集合  $\\operatorname{D}$  的纯度越高。以 hair 为例，其中它有 short 和 long 两个可能取值，则分别用  $\\operatorname{D}^{1} $  （hair = long）和  $\\operatorname{D}^{2} $  （hair = short）来表示。 \n",
    "\n",
    "其中为  $\\operatorname{D}^{1}$  的数据编号为  $\\\\{0，4，6，8，9，10，12，14，15\\\\}$  共 9 个，在这之中为 man 的有  $\\\\{0，4，6\\\\}$  共 3 个占比为  $\\frac{3}{9}$  ，为 woman 的有  $\\\\{8, 9，10，12，14，15\\\\}$  共 6 个占比为  $\\frac{6}{9}$  。 \n",
    "\n",
    "同样  $\\operatorname{D}^{2}$  编号为  $\\\\{1，2，3，5，7，11，13, 16\\\\}$  共 8 个，其中为 man 的有  $\\\\{1，2，3，5，7\\\\}$  共 5 个占比  $\\frac{5}{8}$  ，为 woman 的有  $\\\\{11，13, 16\\\\}$  共 3 个占比  $\\frac{3}{8}$  ，若按照 hair 进行划分，则两个分支点的信息熵为： \n",
    "\n",
    "$$\\operatorname{Ent}(\\operatorname{D}^{1})=-(\\frac{3}{9}\\;log_{2}\\frac{3}{9}+\\frac{6}{9}\\;log_{2}\\frac{6}{9})=0.449$$ \n",
    "\n",
    "$$\\operatorname{Ent}(\\operatorname{D}^{2})=-(\\frac{5}{8}\\;log_{2}\\frac{5}{8}+\\frac{3}{8}\\;log_{2}\\frac{3}{8})=0.486$$ \n",
    "\n",
    "根据信息增益的公式可以计算出 hair 的信息增益为： \n",
    "\n",
    "$$ \\operatorname{Gain}(\\operatorname{D}, \\text {hair})=\\operatorname{Ent}(\\operatorname{D})-\\sum_{m=1}^{2} \\frac{\\left|\\operatorname{D}^{m}\\right|}{|\\operatorname{D}|} \\operatorname{Ent}\\left(\\operatorname{D}^{m}\\right)=0.9975-\\left(\\frac{9}{17} * 0.449+\\frac{8}{17} * 0.486\\right)=0.062 $$ \n",
    "\n",
    "下面我们用 Python 来实现信息增益（ID3）算法： "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "3a9e4cca",
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_gain(data, base_ent, feature):\n",
    "    \"\"\"\n",
    "    参数:\n",
    "    data -- 数据集\n",
    "    base_ent -- 根节点的信息熵\n",
    "    feature -- 计算信息增益的特征\n",
    "\n",
    "    返回:\n",
    "    Ent -- 信息熵\n",
    "    \"\"\"\n",
    "    # 计算信息增益\n",
    "    feature_list = data[feature]  # 得到一个特征的全部取值\n",
    "    unique_value = set(feature_list)  # 特征取值的类别\n",
    "    feature_ent = 0.0\n",
    "\n",
    "    for each_feature in unique_value:\n",
    "        temp_data = data[data[feature] == each_feature]\n",
    "        weight = len(temp_data) / len(feature_list)  # 计算该特征的权重值\n",
    "        temp_ent = weight * get_Ent(temp_data)\n",
    "        feature_ent = feature_ent + temp_ent\n",
    "\n",
    "    gain = base_ent - feature_ent  # 信息增益\n",
    "    return gain"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8b76974a",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "完成信息增益函数后，尝试计算特征 hair 的信息增益值。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "id": "747c6d00",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.062200515199107964"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "get_gain(data, base_ent, \"hair\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "53e0d377",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.062200515199107964"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "0.062200515199107964"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9ecd71e4",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "##  19.6.  信息增益率（C4.5）  # \n",
    "\n",
    "信息增益也存在许多不足之处，经过大量的实验发现，当信息增益作为标准时，易偏向于取值较多的特征，为了避免这种偏好给预测结果带来的不好影响，可以使用增益率来选择最优划分。增益率的公式定义为: \n",
    "\n",
    "$$ \\operatorname{GainRatio}(\\operatorname{D},a)=\\frac{\\operatorname{Gain}(\\operatorname{D},a)}{\\operatorname{IV}(a)} \\tag{3} $$ \n",
    "\n",
    "其中： \n",
    "\n",
    "$$ \\operatorname{IV}(a)=-\\sum_{m=1}^{M}\\frac{\\left | \\operatorname{D}^{m} \\right |}{\\left | \\operatorname{D} \\right |}\\; log_{2}\\frac{\\left | \\operatorname{D}^{m} \\right |}{\\left | \\operatorname{D} \\right |} \\tag{4} $$ \n",
    "\n",
    "$\\operatorname{IV}(a)$  称为特征  $a$  的固有值，当  $a$  的取值数目越多，则  $\\operatorname{IV}(a)$  的值通常会比较大。例如： \n",
    "\n",
    "$$\\operatorname{IV}(\\operatorname{hair})= -\\frac{9}{17}\\; log_{2}\\frac{9}{17}-\\frac{8}{17}\\; log_{2}\\frac{8}{17}=0.998 $$ \n",
    "\n",
    "$$\\operatorname{IV}(\\operatorname{voice})= -\\frac{7}{17}\\; log_{2}\\frac{7}{17} -\\frac{5}{17}\\; log_{2}\\frac{5}{17} - \\frac{5}{17}\\; log_{2}\\frac{5}{17} = 1.566$$ \n",
    "\n",
    "##  19.7.  连续值处理  # \n",
    "\n",
    "在前面介绍的特征选择中，都是对离散型数据进行处理，但在实际的生活中数据常常会出现连续值的情况，如生成数据中的身高，当数据较少时，可以将每一个值作为一个类别，但当数据量大时，这样是不可取的，在 C4.5 算法中采用二分法对连续值进行处理。 \n",
    "\n",
    "对于连续的属性  $X$  假设共出现了  $n$  个不同的取值，将这些取值从小到大排序  $\\\\{x_{1},x_{2},x_{3},…,x_{n} \\\\} $  ，其中找一点作为划分点  $t$  ，则将数据划分为两类，大于  $t$  的为一类，小于  $t$  的为另一类。而  $t$  的取值通常为相邻两点的平均数  $t=\\frac{x_{i}+x_{i+1}}{2}$  。 \n",
    "\n",
    "则在  $n$  个连续值之中，可以作为划分点的  $t$  有  $n-1$  个。通过遍历可以像离散型一样来考察这些划分点。 \n",
    "\n",
    "$$ \\operatorname{Gain}(\\operatorname{D}, X)=\\operatorname{Ent}(\\operatorname{D})-\\frac{\\left|\\operatorname{D}<t\\right|}{|\\operatorname{D}|} \\operatorname{Ent}\\left(\\operatorname{D}<t\\right)-\\frac{\\left|\\operatorname{D}>t\\right|}{|\\operatorname{D}|} \\operatorname{Ent}\\left(\\operatorname{D}>t\\right) \\tag{5} $$ \n",
    "\n",
    "其中得到样本  $\\operatorname{D}$  基于划分点  $t$  二分后的信息增益，于是我们可以选择使得  $\\operatorname{Gain}(\\operatorname{D},X)$  值最大的划分点。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "34056043",
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_splitpoint(data, base_ent, feature):\n",
    "    \"\"\"\n",
    "    参数:\n",
    "    data -- 数据集\n",
    "    base_ent -- 根节点的信息熵\n",
    "    feature -- 需要划分的连续特征\n",
    "\n",
    "    返回:\n",
    "    final_t -- 连续值最优划分点\n",
    "    \"\"\"\n",
    "    # 将连续值进行排序并转化为浮点类型\n",
    "    continues_value = data[feature].sort_values().astype(np.float64)\n",
    "    continues_value = [i for i in continues_value]  # 不保留原来的索引\n",
    "    t_set = []\n",
    "    t_ent = {}\n",
    "\n",
    "    # 得到划分点 t 的集合\n",
    "    for i in range(len(continues_value) - 1):\n",
    "        temp_t = (continues_value[i] + continues_value[i + 1]) / 2\n",
    "        t_set.append(temp_t)\n",
    "\n",
    "    # 计算最优划分点\n",
    "    for each_t in t_set:\n",
    "        # 将大于划分点的分为一类\n",
    "        temp1_data = data[data[feature].astype(np.float64) > each_t]\n",
    "        # 将小于划分点的分为一类\n",
    "        temp2_data = data[data[feature].astype(np.float64) < each_t]\n",
    "        weight1 = len(temp1_data) / len(data)\n",
    "        weight2 = len(temp2_data) / len(data)\n",
    "        # 计算每个划分点的信息增益\n",
    "        temp_ent = (\n",
    "            base_ent - weight1 * get_Ent(temp1_data) - weight2 * get_Ent(temp2_data)\n",
    "        )\n",
    "        t_ent[each_t] = temp_ent\n",
    "    print(\"t_ent:\", t_ent)\n",
    "    final_t = max(t_ent, key=t_ent.get)\n",
    "    return final_t"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f2a6d6d9",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "实现连续值最优划分点的函数后，寻找 height 连续特征值的划分点。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "ba55d1d2",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "t_ent: {158.0: 0.1179805181500242, 159.5: 0.1179805181500242, 161.0: 0.2624392604045631, 162.0: 0.2624392604045631, 163.0: 0.3856047022157598, 163.5: 0.15618502398692893, 164.0: 0.3635040117533678, 165.0: 0.33712865788827096, 167.0: 0.4752766311586692, 170.0: 0.32920899348970845, 172.0: 0.5728389611412551, 172.5: 0.4248356349861979, 173.5: 0.3165383509071513, 174.5: 0.22314940393447813, 176.5: 0.14078143361499595, 179.0: 0.06696192680347068}\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "172.0"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "final_t = get_splitpoint(data, base_ent, \"height\")\n",
    "final_t"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "cf5a117e",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "##  19.8.  决策树算法实现  # \n",
    "\n",
    "在对决策树中最佳特征选择和连续值处理之后，接下来就是对决策树的构建。 \n",
    "\n",
    "首先我们将连续值进行处理，在找到最佳划分点之后，将  $<t$  的值设为 0，将  $>=t$  的值设为 1。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "216fde63",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>hair</th>\n",
       "      <th>voice</th>\n",
       "      <th>height</th>\n",
       "      <th>ear_stud</th>\n",
       "      <th>labels</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>long</td>\n",
       "      <td>thick</td>\n",
       "      <td>&gt;172.0</td>\n",
       "      <td>no</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>short</td>\n",
       "      <td>medium</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>no</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>short</td>\n",
       "      <td>thin</td>\n",
       "      <td>&gt;172.0</td>\n",
       "      <td>yes</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>short</td>\n",
       "      <td>thick</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>no</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>long</td>\n",
       "      <td>medium</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>no</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>short</td>\n",
       "      <td>thick</td>\n",
       "      <td>&gt;172.0</td>\n",
       "      <td>no</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>long</td>\n",
       "      <td>thick</td>\n",
       "      <td>&gt;172.0</td>\n",
       "      <td>yes</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>short</td>\n",
       "      <td>thin</td>\n",
       "      <td>&gt;172.0</td>\n",
       "      <td>no</td>\n",
       "      <td>man</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>long</td>\n",
       "      <td>thin</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>yes</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>long</td>\n",
       "      <td>medium</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>yes</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>long</td>\n",
       "      <td>thick</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>yes</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>short</td>\n",
       "      <td>thin</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>yes</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>long</td>\n",
       "      <td>thin</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>no</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>short</td>\n",
       "      <td>medium</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>no</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>long</td>\n",
       "      <td>thick</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>yes</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>long</td>\n",
       "      <td>thin</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>no</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>short</td>\n",
       "      <td>medium</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>yes</td>\n",
       "      <td>woman</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     hair   voice  height ear_stud labels\n",
       "0    long   thick  >172.0       no    man\n",
       "1   short  medium  <172.0       no    man\n",
       "2   short    thin  >172.0      yes    man\n",
       "3   short   thick  <172.0       no    man\n",
       "4    long  medium  <172.0       no    man\n",
       "5   short   thick  >172.0       no    man\n",
       "6    long   thick  >172.0      yes    man\n",
       "7   short    thin  >172.0       no    man\n",
       "8    long    thin  <172.0      yes  woman\n",
       "9    long  medium  <172.0      yes  woman\n",
       "10   long   thick  <172.0      yes  woman\n",
       "11  short    thin  <172.0      yes  woman\n",
       "12   long    thin  <172.0       no  woman\n",
       "13  short  medium  <172.0       no  woman\n",
       "14   long   thick  <172.0      yes  woman\n",
       "15   long    thin  <172.0       no  woman\n",
       "16  short  medium  <172.0      yes  woman"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def choice_1(x, t):\n",
    "    if x > t:\n",
    "        return \">{}\".format(t)\n",
    "    else:\n",
    "        return \"<{}\".format(t)\n",
    "\n",
    "deal_data = data.copy()\n",
    "# 使用lambda和map函数将 height 按照final_t划分为两个类别\n",
    "deal_data[\"height\"] = pd.Series(\n",
    "    map(lambda x: choice_1(int(x), final_t), deal_data[\"height\"])\n",
    ")\n",
    "deal_data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "bd3814c9",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    " \n",
    "  \n",
    "将数据进行预处理之后，接下来就是选择最优的划分特征。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "id": "6250ae42",
   "metadata": {},
   "outputs": [],
   "source": [
    "def choose_feature(data):\n",
    "    \"\"\"\n",
    "    参数:\n",
    "    data -- 数据集\n",
    "\n",
    "    返回:\n",
    "    best_feature -- 最优的划分特征\n",
    "    \"\"\"\n",
    "    # 选择最优划分特征\n",
    "    num_features = len(data.columns) - 1  # 特征数量\n",
    "    base_ent = get_Ent(data)\n",
    "    best_gain = 0.0  # 初始化信息增益\n",
    "    best_feature = data.columns[0]\n",
    "    for i in range(num_features):  # 遍历所有特征\n",
    "        temp_gain = get_gain(data, base_ent, data.columns[i])  # 计算信息增益\n",
    "        if temp_gain > best_gain:  # 选择最大的信息增益\n",
    "            best_gain = temp_gain\n",
    "            best_feature = data.columns[i]\n",
    "    return best_feature  # 返回最优特征"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "55c1cb5e",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "完成函数之后，我们首先看看数据集中信息增益值最大的特征是什么？ "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "id": "e4d94c86",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'height'"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "choose_feature(deal_data)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2329822f",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "在将所有的子模块构建好之后，最后就是对核心决策树的构建，本次实验采用信息增益（ID3）的方式构建决策树。在构建的过程中，根据算法流程，我们反复遍历数据集，计算每一个特征的信息增益，通过比较将最好的特征作为父节点，根据特征的值确定分支子节点，然后重复以上操作，直到某一个分支全部属于同一类别，或者遍历完所有的数据特征，当遍历到最后一个特征时，若分支数据依然「不纯」，就将其中数量较多的类别作为子节点。 \n",
    "\n",
    "因此最好采用递归的方式来构建决策树。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "89dac2e6",
   "metadata": {},
   "outputs": [],
   "source": [
    "def create_tree(data):\n",
    "    \"\"\"\n",
    "    参数:\n",
    "    data -- 数据集\n",
    "\n",
    "    返回:\n",
    "    tree -- 以字典的形式返回决策树\n",
    "    \"\"\"\n",
    "    # 构建决策树\n",
    "    feature_list = data.columns[:-1].tolist()\n",
    "    label_list = data.iloc[:, -1]\n",
    "    if len(data[\"labels\"].value_counts()) == 1:\n",
    "        leaf_node = data[\"labels\"].mode().values\n",
    "        return leaf_node  # 第一个递归结束条件：所有的类标签完全相同\n",
    "    if len(feature_list) == 1:\n",
    "        leaf_node = data[\"labels\"].mode().values\n",
    "        return leaf_node  # 第二个递归结束条件：用完了所有特征\n",
    "    best_feature = choose_feature(data)  # 最优划分特征\n",
    "    tree = {best_feature: {}}\n",
    "    feat_values = data[best_feature]\n",
    "    unique_value = set(feat_values)\n",
    "    for value in unique_value:\n",
    "        temp_data = data[data[best_feature] == value]\n",
    "        temp_data = temp_data.drop([best_feature], axis=1)\n",
    "        tree[best_feature][value] = create_tree(temp_data)\n",
    "    return tree"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7b08f9ca",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "完成创建决策树函数后，接下来对我们第一棵树进行创建。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "id": "46711a55",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'height': {'>172.0': array(['man'], dtype=object),\n",
       "  '<172.0': {'ear_stud': {'no': {'voice': {'thick': array(['man'], dtype=object),\n",
       "      'thin': array(['woman'], dtype=object),\n",
       "      'medium': array(['man'], dtype=object)}},\n",
       "    'yes': array(['woman'], dtype=object)}}}}"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tree = create_tree(deal_data)\n",
    "tree"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dd9977fc",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "通过字典的方式表示构建好的树，可以通过图像的方式更加直观的了解。 \n",
    "\n",
    "![image](https://cdn.aibydoing.com/aibydoing/images/document-uid214893labid7506timestamp1548036774075.png)\n",
    "\n",
    "通过图形可以看出，在构建决策树时不一定每一个特征都会成为树的节点（如同 hair）。 \n",
    "\n",
    "在构建好决策树之后，最终就可以使用未知样本进行预测分类。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "id": "429b2b98",
   "metadata": {},
   "outputs": [],
   "source": [
    "def classify(tree, test):\n",
    "    \"\"\"\n",
    "    参数:\n",
    "    data -- 数据集\n",
    "    test -- 需要测试的数据\n",
    "\n",
    "    返回:\n",
    "    class_label -- 分类结果\n",
    "    \"\"\"\n",
    "    # 决策分类\n",
    "    first_feature = list(tree.keys())[0]  # 获取根节点\n",
    "    feature_dict = tree[first_feature]  # 根节点下的树\n",
    "    labels = test.columns.tolist()\n",
    "    value = test[first_feature][0]\n",
    "    for key in feature_dict.keys():\n",
    "        if value == key:\n",
    "            if type(feature_dict[key]).__name__ == \"dict\":  # 判断该节点是否为叶节点\n",
    "                class_label = classify(feature_dict[key], test)  # 采用递归直到遍历到叶节点\n",
    "            else:\n",
    "                class_label = feature_dict[key]\n",
    "    return class_label"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "94d7041f",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "在分类函数完成之后，接下来我们尝试对未知数据进行分类。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "id": "4ae73640",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>hair</th>\n",
       "      <th>voice</th>\n",
       "      <th>height</th>\n",
       "      <th>ear_stud</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>long</td>\n",
       "      <td>thin</td>\n",
       "      <td>163</td>\n",
       "      <td>yes</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   hair voice  height ear_stud\n",
       "0  long  thin     163      yes"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test = pd.DataFrame(\n",
    "    {\"hair\": [\"long\"], \"voice\": [\"thin\"], \"height\": [163], \"ear_stud\": [\"yes\"]}\n",
    ")\n",
    "test"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "dd0018a2",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "\n",
    "  \n",
    "对连续值进行预处理： "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "5ca29a36",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>hair</th>\n",
       "      <th>voice</th>\n",
       "      <th>height</th>\n",
       "      <th>ear_stud</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>long</td>\n",
       "      <td>thin</td>\n",
       "      <td>&lt;172.0</td>\n",
       "      <td>yes</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   hair voice  height ear_stud\n",
       "0  long  thin  <172.0      yes"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test[\"height\"] = pd.Series(map(lambda x: choice_1(int(x), final_t), test[\"height\"]))\n",
    "test"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a3f1606a",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "\n",
    "  \n",
    "分类预测： "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "d676dca3",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['woman'], dtype=object)"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "classify(tree, test)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "95845fa6",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "一个身高 163 厘米，长发，带着耳钉且声音纤细的人，在我们构建的决策树判断后预测为一名女性。 \n",
    "\n",
    "上面的实验中，我们没有考虑  $=划分点$  的情况，你可以自行尝试将  $>=划分点$  或  $<=划分点$  归为一类，看看结果又有哪些不同？ \n",
    "\n",
    "##  19.9.  预剪枝和后剪枝  # \n",
    "\n",
    "在决策树的构建过程中，特别在数据特征非常多时，为了尽可能正确的划分每一个训练样本，结点的划分就会不停的重复，则一棵决策树的分支就非常多。对于训练集而言，拟合出来的模型是非常完美的。但是，这种完美就使得整体模型的复杂度变高，同时对其他数据集的预测能力下降，也就是我们常说的过拟合使得模型的泛化能力变弱。为了避免过拟合问题的出现，在决策树中最常见的两种方法就是预剪枝和后剪枝。 \n",
    "\n",
    "##  19.10.  预剪枝  # \n",
    "\n",
    "预剪枝，顾名思义预先减去枝叶，在构建决策树模型的时候，每一次对数据划分之前进行估计，如果当前节点的划分不能带来决策树泛化的提升，则停止划分并将当前节点标记为叶节点。例如前面构造的决策树，按照决策树的构建原则，通过 ` height  ` 特征进行划分后  $<172$  分支中又按照 ` ear_stud  ` 特征值进行继续划分。如果应用预剪枝，则当通过 ` height  ` 进行特征划分之后，对  $<172$  分支是否进行 ` ear_stud  ` 特征进行划分时计算划分前后的准确度，如果划分后的更高则按照 ` ear_stud  ` 继续划分，如果更低则停止划分。 \n",
    "\n",
    "##  19.11.  后剪枝  # \n",
    "\n",
    "跟预剪枝在构建决策树的过程中判断是否继续特征划分所不同的是，后剪枝在决策树构建好之后对树进行修剪。如果说预剪枝是自顶向下的修剪，那么后剪枝就是自底向上进行修剪。后剪枝将最后的分支节点替换为叶节点，判断是否带来决策树泛化的提升，是则进行修剪，并将该分支节点替换为叶节点，否则不进行修剪。例如在前面构建好决策树之后，  $>172$  分支的 voice 特征，将其替换为叶节点如（man），计算替换前后划分准确度，如果替换后准确度更高则进行修剪（用叶节点替换分支节点），否则不修剪。 \n",
    "\n",
    "##  19.12.  学生成绩分类预测  # \n",
    "\n",
    "在前面我们使用 Python 将决策树的特征选择，连续值处理和预测分类做了详细的讲解。接下来我们应用决策树模型对真实的数据进行分类预测。 \n",
    "\n",
    "本次应用到的数据为学生成绩数据集 ` course-13-student.csv  ` ，一共有 395 条数据，26 个特征。首先加载并预览数据集： "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "a0885ab2",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "File 'course-13-student.csv' already there; not retrieving.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "!wget -nc https://cdn.aibydoing.com/aibydoing/files/course-13-student.csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "8782a913",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>school</th>\n",
       "      <th>sex</th>\n",
       "      <th>address</th>\n",
       "      <th>Pstatus</th>\n",
       "      <th>Pedu</th>\n",
       "      <th>reason</th>\n",
       "      <th>guardian</th>\n",
       "      <th>traveltime</th>\n",
       "      <th>studytime</th>\n",
       "      <th>schoolsup</th>\n",
       "      <th>...</th>\n",
       "      <th>famrel</th>\n",
       "      <th>freetime</th>\n",
       "      <th>goout</th>\n",
       "      <th>Dalc</th>\n",
       "      <th>Walc</th>\n",
       "      <th>health</th>\n",
       "      <th>absences</th>\n",
       "      <th>G1</th>\n",
       "      <th>G2</th>\n",
       "      <th>G3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>A</td>\n",
       "      <td>4.0</td>\n",
       "      <td>course</td>\n",
       "      <td>mother</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>yes</td>\n",
       "      <td>...</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>6</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>1.0</td>\n",
       "      <td>course</td>\n",
       "      <td>father</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>no</td>\n",
       "      <td>...</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>1.0</td>\n",
       "      <td>other</td>\n",
       "      <td>mother</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>yes</td>\n",
       "      <td>...</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>10</td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>3.0</td>\n",
       "      <td>home</td>\n",
       "      <td>mother</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>no</td>\n",
       "      <td>...</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>5</td>\n",
       "      <td>2</td>\n",
       "      <td>15</td>\n",
       "      <td>14</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>3.0</td>\n",
       "      <td>home</td>\n",
       "      <td>father</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>no</td>\n",
       "      <td>...</td>\n",
       "      <td>4</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>5</td>\n",
       "      <td>4</td>\n",
       "      <td>6</td>\n",
       "      <td>10</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 27 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "  school sex address Pstatus  Pedu  reason guardian  traveltime  studytime  \\\n",
       "0     GP   F       U       A   4.0  course   mother           2          2   \n",
       "1     GP   F       U       T   1.0  course   father           1          2   \n",
       "2     GP   F       U       T   1.0   other   mother           1          2   \n",
       "3     GP   F       U       T   3.0    home   mother           1          3   \n",
       "4     GP   F       U       T   3.0    home   father           1          2   \n",
       "\n",
       "  schoolsup  ... famrel freetime goout Dalc Walc health absences  G1  G2  G3  \n",
       "0       yes  ...      4        3     4    1    1      3        6   5   6   6  \n",
       "1        no  ...      5        3     3    1    1      3        4   5   5   6  \n",
       "2       yes  ...      4        3     2    2    3      3       10   7   8  10  \n",
       "3        no  ...      3        2     2    1    1      5        2  15  14  15  \n",
       "4        no  ...      4        3     2    1    2      5        4   6  10  10  \n",
       "\n",
       "[5 rows x 27 columns]"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 导入数据集并预览\n",
    "stu_grade = pd.read_csv(\"course-13-student.csv\")\n",
    "stu_grade.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8708a570",
   "metadata": {},
   "source": [
    "|  school  |  sex  |  address  |  Pstatus  |  Pedu  |  reason  |  guardian  |  traveltime  |  studytime  |  schoolsup  |  ...  |  famrel  |  freetime  |  goout  |  Dalc  |  Walc  |  health  |  absences  |  G1  |  G2  |  G3   \n",
    "---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---  \n",
    "0  |  GP  |  F  |  U  |  A  |  4.0  |  course  |  mother  |  2  |  2  |  yes  |  ...  |  4  |  3  |  4  |  1  |  1  |  3  |  6  |  5  |  6  |  6   \n",
    "1  |  GP  |  F  |  U  |  T  |  1.0  |  course  |  father  |  1  |  2  |  no  |  ...  |  5  |  3  |  3  |  1  |  1  |  3  |  4  |  5  |  5  |  6   \n",
    "2  |  GP  |  F  |  U  |  T  |  1.0  |  other  |  mother  |  1  |  2  |  yes  |  ...  |  4  |  3  |  2  |  2  |  3  |  3  |  10  |  7  |  8  |  10   \n",
    "3  |  GP  |  F  |  U  |  T  |  3.0  |  home  |  mother  |  1  |  3  |  no  |  ...  |  3  |  2  |  2  |  1  |  1  |  5  |  2  |  15  |  14  |  15   \n",
    "4  |  GP  |  F  |  U  |  T  |  3.0  |  home  |  father  |  1  |  2  |  no  |  ...  |  4  |  3  |  2  |  1  |  2  |  5  |  4  |  6  |  10  |  10   \n",
    "  \n",
    "5 rows × 27 columns \n",
    "\n",
    "由于特征过多，我们选择部分特征作为决策树模型的分类特征,分别为： \n",
    "\n",
    "  * school：学生所读学校（GP，MS） \n",
    "\n",
    "  * sex：性别（F：女，M：男） \n",
    "\n",
    "  * address：家庭住址（U：城市，R：郊区） \n",
    "\n",
    "  * Pstatus：父母状态（A：同居，T：分居） \n",
    "\n",
    "  * Pedu：父母学历由低到高 \n",
    "\n",
    "  * reason：选择这所学校的原因（home：家庭，course：课程设计，reputation：学校地位，other：其他） \n",
    "\n",
    "  * guardian：监护人（mother：母亲，father：父亲，other：其他） \n",
    "\n",
    "  * studytime：周末学习时长 \n",
    "\n",
    "  * schoolsup：额外教育支持（yes：有，no：没有） \n",
    "\n",
    "  * famsup：家庭教育支持（yes：有，no：没有） \n",
    "\n",
    "  * paid：是否上补习班（yes：是，no：否） \n",
    "\n",
    "  * higher：是否想受更好的教育（yes：是，no：否） \n",
    "\n",
    "  * internet：是否家里联网（yes：是，no：否） \n",
    "\n",
    "  * G1：一阶段测试成绩 \n",
    "\n",
    "  * G2：二阶段测试成绩 \n",
    "\n",
    "  * G3：最终成绩 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "e44810f4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>school</th>\n",
       "      <th>sex</th>\n",
       "      <th>address</th>\n",
       "      <th>Pstatus</th>\n",
       "      <th>Pedu</th>\n",
       "      <th>reason</th>\n",
       "      <th>guardian</th>\n",
       "      <th>studytime</th>\n",
       "      <th>schoolsup</th>\n",
       "      <th>famsup</th>\n",
       "      <th>paid</th>\n",
       "      <th>higher</th>\n",
       "      <th>internet</th>\n",
       "      <th>G1</th>\n",
       "      <th>G2</th>\n",
       "      <th>G3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>A</td>\n",
       "      <td>4.0</td>\n",
       "      <td>course</td>\n",
       "      <td>mother</td>\n",
       "      <td>2</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>1.0</td>\n",
       "      <td>course</td>\n",
       "      <td>father</td>\n",
       "      <td>2</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>5</td>\n",
       "      <td>5</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>1.0</td>\n",
       "      <td>other</td>\n",
       "      <td>mother</td>\n",
       "      <td>2</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>7</td>\n",
       "      <td>8</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>3.0</td>\n",
       "      <td>home</td>\n",
       "      <td>mother</td>\n",
       "      <td>3</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>15</td>\n",
       "      <td>14</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>3.0</td>\n",
       "      <td>home</td>\n",
       "      <td>father</td>\n",
       "      <td>2</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>6</td>\n",
       "      <td>10</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  school sex address Pstatus  Pedu  reason guardian  studytime schoolsup  \\\n",
       "0     GP   F       U       A   4.0  course   mother          2       yes   \n",
       "1     GP   F       U       T   1.0  course   father          2        no   \n",
       "2     GP   F       U       T   1.0   other   mother          2       yes   \n",
       "3     GP   F       U       T   3.0    home   mother          3        no   \n",
       "4     GP   F       U       T   3.0    home   father          2        no   \n",
       "\n",
       "  famsup paid higher internet  G1  G2  G3  \n",
       "0     no   no    yes       no   5   6   6  \n",
       "1    yes   no    yes      yes   5   5   6  \n",
       "2     no  yes    yes      yes   7   8  10  \n",
       "3    yes  yes    yes      yes  15  14  15  \n",
       "4    yes  yes    yes       no   6  10  10  "
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "new_data = stu_grade.iloc[:, [0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 14, 15, 24, 25, 26]]\n",
    "new_data.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "91805f1d",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "|  school  |  sex  |  address  |  Pstatus  |  Pedu  |  reason  |  guardian  |  studytime  |  schoolsup  |  famsup  |  paid  |  higher  |  internet  |  G1  |  G2  |  G3   \n",
    "---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---  \n",
    "0  |  GP  |  F  |  U  |  A  |  4.0  |  course  |  mother  |  2  |  yes  |  no  |  no  |  yes  |  no  |  5  |  6  |  6   \n",
    "1  |  GP  |  F  |  U  |  T  |  1.0  |  course  |  father  |  2  |  no  |  yes  |  no  |  yes  |  yes  |  5  |  5  |  6   \n",
    "2  |  GP  |  F  |  U  |  T  |  1.0  |  other  |  mother  |  2  |  yes  |  no  |  yes  |  yes  |  yes  |  7  |  8  |  10   \n",
    "3  |  GP  |  F  |  U  |  T  |  3.0  |  home  |  mother  |  3  |  no  |  yes  |  yes  |  yes  |  yes  |  15  |  14  |  15   \n",
    "4  |  GP  |  F  |  U  |  T  |  3.0  |  home  |  father  |  2  |  no  |  yes  |  yes  |  yes  |  no  |  6  |  10  |  10   \n",
    "  \n",
    "首先我们将成绩 G1，G2，G3 根据分数进行等级划分，将 0-4 划分为 bad，5-9 划分为 medium ， "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "id": "a87761df",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>school</th>\n",
       "      <th>sex</th>\n",
       "      <th>address</th>\n",
       "      <th>Pstatus</th>\n",
       "      <th>Pedu</th>\n",
       "      <th>reason</th>\n",
       "      <th>guardian</th>\n",
       "      <th>studytime</th>\n",
       "      <th>schoolsup</th>\n",
       "      <th>famsup</th>\n",
       "      <th>paid</th>\n",
       "      <th>higher</th>\n",
       "      <th>internet</th>\n",
       "      <th>G1</th>\n",
       "      <th>G2</th>\n",
       "      <th>G3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>A</td>\n",
       "      <td>4.0</td>\n",
       "      <td>course</td>\n",
       "      <td>mother</td>\n",
       "      <td>2</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>medium</td>\n",
       "      <td>medium</td>\n",
       "      <td>medium</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>1.0</td>\n",
       "      <td>course</td>\n",
       "      <td>father</td>\n",
       "      <td>2</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>medium</td>\n",
       "      <td>medium</td>\n",
       "      <td>medium</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>1.0</td>\n",
       "      <td>other</td>\n",
       "      <td>mother</td>\n",
       "      <td>2</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>medium</td>\n",
       "      <td>medium</td>\n",
       "      <td>good</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>3.0</td>\n",
       "      <td>home</td>\n",
       "      <td>mother</td>\n",
       "      <td>3</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>excellent</td>\n",
       "      <td>good</td>\n",
       "      <td>excellent</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>3.0</td>\n",
       "      <td>home</td>\n",
       "      <td>father</td>\n",
       "      <td>2</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>medium</td>\n",
       "      <td>good</td>\n",
       "      <td>good</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  school sex address Pstatus  Pedu  reason guardian  studytime schoolsup  \\\n",
       "0     GP   F       U       A   4.0  course   mother          2       yes   \n",
       "1     GP   F       U       T   1.0  course   father          2        no   \n",
       "2     GP   F       U       T   1.0   other   mother          2       yes   \n",
       "3     GP   F       U       T   3.0    home   mother          3        no   \n",
       "4     GP   F       U       T   3.0    home   father          2        no   \n",
       "\n",
       "  famsup paid higher internet         G1      G2         G3  \n",
       "0     no   no    yes       no     medium  medium     medium  \n",
       "1    yes   no    yes      yes     medium  medium     medium  \n",
       "2     no  yes    yes      yes     medium  medium       good  \n",
       "3    yes  yes    yes      yes  excellent    good  excellent  \n",
       "4    yes  yes    yes       no     medium    good       good  "
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def choice_2(x):\n",
    "    x = int(x)\n",
    "    if x < 5:\n",
    "        return \"bad\"\n",
    "    elif x >= 5 and x < 10:\n",
    "        return \"medium\"\n",
    "    elif x >= 10 and x < 15:\n",
    "        return \"good\"\n",
    "    else:\n",
    "        return \"excellent\"\n",
    "\n",
    "stu_data = new_data.copy()\n",
    "stu_data[\"G1\"] = pd.Series(map(lambda x: choice_2(x), stu_data[\"G1\"]))\n",
    "stu_data[\"G2\"] = pd.Series(map(lambda x: choice_2(x), stu_data[\"G2\"]))\n",
    "stu_data[\"G3\"] = pd.Series(map(lambda x: choice_2(x), stu_data[\"G3\"]))\n",
    "stu_data.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "94b4107c",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "|  school  |  sex  |  address  |  Pstatus  |  Pedu  |  reason  |  guardian  |  studytime  |  schoolsup  |  famsup  |  paid  |  higher  |  internet  |  G1  |  G2  |  G3   \n",
    "---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---  \n",
    "0  |  GP  |  F  |  U  |  A  |  4.0  |  course  |  mother  |  2  |  yes  |  no  |  no  |  yes  |  no  |  medium  |  medium  |  medium   \n",
    "1  |  GP  |  F  |  U  |  T  |  1.0  |  course  |  father  |  2  |  no  |  yes  |  no  |  yes  |  yes  |  medium  |  medium  |  medium   \n",
    "2  |  GP  |  F  |  U  |  T  |  1.0  |  other  |  mother  |  2  |  yes  |  no  |  yes  |  yes  |  yes  |  medium  |  medium  |  good   \n",
    "3  |  GP  |  F  |  U  |  T  |  3.0  |  home  |  mother  |  3  |  no  |  yes  |  yes  |  yes  |  yes  |  excellent  |  good  |  excellent   \n",
    "4  |  GP  |  F  |  U  |  T  |  3.0  |  home  |  father  |  2  |  no  |  yes  |  yes  |  yes  |  no  |  medium  |  good  |  good   \n",
    "  \n",
    "同样我们对 Pedu（父母教育程度）也进行划分 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "8e6edd27",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>school</th>\n",
       "      <th>sex</th>\n",
       "      <th>address</th>\n",
       "      <th>Pstatus</th>\n",
       "      <th>Pedu</th>\n",
       "      <th>reason</th>\n",
       "      <th>guardian</th>\n",
       "      <th>studytime</th>\n",
       "      <th>schoolsup</th>\n",
       "      <th>famsup</th>\n",
       "      <th>paid</th>\n",
       "      <th>higher</th>\n",
       "      <th>internet</th>\n",
       "      <th>G1</th>\n",
       "      <th>G2</th>\n",
       "      <th>G3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>A</td>\n",
       "      <td>high</td>\n",
       "      <td>course</td>\n",
       "      <td>mother</td>\n",
       "      <td>2</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>medium</td>\n",
       "      <td>medium</td>\n",
       "      <td>medium</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>low</td>\n",
       "      <td>course</td>\n",
       "      <td>father</td>\n",
       "      <td>2</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>medium</td>\n",
       "      <td>medium</td>\n",
       "      <td>medium</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>low</td>\n",
       "      <td>other</td>\n",
       "      <td>mother</td>\n",
       "      <td>2</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>medium</td>\n",
       "      <td>medium</td>\n",
       "      <td>good</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>medium</td>\n",
       "      <td>home</td>\n",
       "      <td>mother</td>\n",
       "      <td>3</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>excellent</td>\n",
       "      <td>good</td>\n",
       "      <td>excellent</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>GP</td>\n",
       "      <td>F</td>\n",
       "      <td>U</td>\n",
       "      <td>T</td>\n",
       "      <td>medium</td>\n",
       "      <td>home</td>\n",
       "      <td>father</td>\n",
       "      <td>2</td>\n",
       "      <td>no</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>yes</td>\n",
       "      <td>no</td>\n",
       "      <td>medium</td>\n",
       "      <td>good</td>\n",
       "      <td>good</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  school sex address Pstatus    Pedu  reason guardian  studytime schoolsup  \\\n",
       "0     GP   F       U       A    high  course   mother          2       yes   \n",
       "1     GP   F       U       T     low  course   father          2        no   \n",
       "2     GP   F       U       T     low   other   mother          2       yes   \n",
       "3     GP   F       U       T  medium    home   mother          3        no   \n",
       "4     GP   F       U       T  medium    home   father          2        no   \n",
       "\n",
       "  famsup paid higher internet         G1      G2         G3  \n",
       "0     no   no    yes       no     medium  medium     medium  \n",
       "1    yes   no    yes      yes     medium  medium     medium  \n",
       "2     no  yes    yes      yes     medium  medium       good  \n",
       "3    yes  yes    yes      yes  excellent    good  excellent  \n",
       "4    yes  yes    yes       no     medium    good       good  "
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def choice_3(x):\n",
    "    x = int(x)\n",
    "    if x > 3:\n",
    "        return \"high\"\n",
    "    elif x > 1.5:\n",
    "        return \"medium\"\n",
    "    else:\n",
    "        return \"low\"\n",
    "\n",
    "stu_data[\"Pedu\"] = pd.Series(map(lambda x: choice_3(x), stu_data[\"Pedu\"]))\n",
    "stu_data.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "18e9fdfa",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "|  school  |  sex  |  address  |  Pstatus  |  Pedu  |  reason  |  guardian  |  studytime  |  schoolsup  |  famsup  |  paid  |  higher  |  internet  |  G1  |  G2  |  G3   \n",
    "---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---  \n",
    "0  |  GP  |  F  |  U  |  A  |  high  |  course  |  mother  |  2  |  yes  |  no  |  no  |  yes  |  no  |  medium  |  medium  |  medium   \n",
    "1  |  GP  |  F  |  U  |  T  |  low  |  course  |  father  |  2  |  no  |  yes  |  no  |  yes  |  yes  |  medium  |  medium  |  medium   \n",
    "2  |  GP  |  F  |  U  |  T  |  low  |  other  |  mother  |  2  |  yes  |  no  |  yes  |  yes  |  yes  |  medium  |  medium  |  good   \n",
    "3  |  GP  |  F  |  U  |  T  |  medium  |  home  |  mother  |  3  |  no  |  yes  |  yes  |  yes  |  yes  |  excellent  |  good  |  excellent   \n",
    "4  |  GP  |  F  |  U  |  T  |  medium  |  home  |  father  |  2  |  no  |  yes  |  yes  |  yes  |  no  |  medium  |  good  |  good   \n",
    "  \n",
    "在等级划分之后，为遵循 scikit-learn 函数的输入规范，需要将数据特征进行替换。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "65efb0d6",
   "metadata": {},
   "outputs": [],
   "source": [
    "def replace_feature(data):\n",
    "    \"\"\"\n",
    "    参数:\n",
    "    data -- 数据集\n",
    "\n",
    "    返回:\n",
    "    data -- 将特征值替换后的数据集\n",
    "    \"\"\"\n",
    "    # 特征值替换\n",
    "    for each in data.columns:  # 遍历每一个特征名称\n",
    "        feature_list = data[each]\n",
    "        unique_value = set(feature_list)\n",
    "        i = 0\n",
    "        for fea_value in unique_value:\n",
    "            data[each] = data[each].replace(fea_value, i)\n",
    "            i += 1\n",
    "    return data"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "ca12bbca",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "将特征值进行替换后展示。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "7913de11",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>school</th>\n",
       "      <th>sex</th>\n",
       "      <th>address</th>\n",
       "      <th>Pstatus</th>\n",
       "      <th>Pedu</th>\n",
       "      <th>reason</th>\n",
       "      <th>guardian</th>\n",
       "      <th>studytime</th>\n",
       "      <th>schoolsup</th>\n",
       "      <th>famsup</th>\n",
       "      <th>paid</th>\n",
       "      <th>higher</th>\n",
       "      <th>internet</th>\n",
       "      <th>G1</th>\n",
       "      <th>G2</th>\n",
       "      <th>G3</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   school  sex  address  Pstatus  Pedu  reason  guardian  studytime  \\\n",
       "0       0    0        1        1     0       3         1          1   \n",
       "1       0    0        1        0     1       3         2          1   \n",
       "2       0    0        1        0     1       2         1          1   \n",
       "3       0    0        1        0     2       1         1          2   \n",
       "4       0    0        1        0     2       1         2          1   \n",
       "\n",
       "   schoolsup  famsup  paid  higher  internet  G1  G2  G3  \n",
       "0          0       0     0       0         0   3   3   3  \n",
       "1          1       1     0       0         1   3   3   3  \n",
       "2          0       0     1       0         1   3   3   2  \n",
       "3          1       1     1       0         1   0   2   0  \n",
       "4          1       1     1       0         0   3   2   2  "
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "stu_data = replace_feature(stu_data)\n",
    "stu_data.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "df6be1f5",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "|  school  |  sex  |  address  |  Pstatus  |  Pedu  |  reason  |  guardian  |  studytime  |  schoolsup  |  famsup  |  paid  |  higher  |  internet  |  G1  |  G2  |  G3   \n",
    "---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---  \n",
    "0  |  0  |  1  |  0  |  1  |  1  |  0  |  0  |  1  |  0  |  1  |  1  |  0  |  1  |  0  |  0  |  0   \n",
    "1  |  0  |  1  |  0  |  0  |  0  |  0  |  2  |  1  |  1  |  0  |  1  |  0  |  0  |  0  |  0  |  0   \n",
    "2  |  0  |  1  |  0  |  0  |  0  |  1  |  0  |  1  |  0  |  1  |  0  |  0  |  0  |  0  |  0  |  3   \n",
    "3  |  0  |  1  |  0  |  0  |  2  |  3  |  0  |  2  |  1  |  0  |  0  |  0  |  0  |  1  |  3  |  1   \n",
    "4  |  0  |  1  |  0  |  0  |  2  |  3  |  2  |  1  |  1  |  0  |  0  |  0  |  1  |  0  |  3  |  3   \n",
    "  \n",
    "加载好预处理的数据集之后，为了实现决策树算法，同样我们需要将数据集分为 训练集和测试集，依照经验：训练集占比为 70%，测试集占 30%。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "179e539f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>school</th>\n",
       "      <th>sex</th>\n",
       "      <th>address</th>\n",
       "      <th>Pstatus</th>\n",
       "      <th>Pedu</th>\n",
       "      <th>reason</th>\n",
       "      <th>guardian</th>\n",
       "      <th>studytime</th>\n",
       "      <th>schoolsup</th>\n",
       "      <th>famsup</th>\n",
       "      <th>paid</th>\n",
       "      <th>higher</th>\n",
       "      <th>internet</th>\n",
       "      <th>G1</th>\n",
       "      <th>G2</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>306</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>343</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>117</th>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>50</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>316</th>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     school  sex  address  Pstatus  Pedu  reason  guardian  studytime  \\\n",
       "306       0    1        1        1     2       3         0          0   \n",
       "343       0    0        1        1     2       1         2          1   \n",
       "117       0    1        1        0     2       1         2          0   \n",
       "50        0    0        1        0     2       3         1          1   \n",
       "316       0    0        1        0     1       3         1          1   \n",
       "\n",
       "     schoolsup  famsup  paid  higher  internet  G1  G2  \n",
       "306          1       0     0       0         0   0   0  \n",
       "343          1       1     0       0         1   3   3  \n",
       "117          1       0     0       0         1   2   2  \n",
       "50           1       1     1       0         1   2   2  \n",
       "316          1       1     1       0         1   3   3  "
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.model_selection import train_test_split\n",
    "\n",
    "X_train, X_test, y_train, y_test = train_test_split(\n",
    "    stu_data.iloc[:, :-1], stu_data[\"G3\"], test_size=0.3, random_state=5\n",
    ")\n",
    "\n",
    "X_test.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "2281c5fd",
   "metadata": {},
   "source": [
    "|  school  |  sex  |  address  |  Pstatus  |  Pedu  |  reason  |  guardian  |  studytime  |  schoolsup  |  famsup  |  paid  |  higher  |  internet  |  G1  |  G2   \n",
    "---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---  \n",
    "306  |  0  |  0  |  0  |  1  |  2  |  0  |  1  |  0  |  1  |  1  |  1  |  0  |  1  |  1  |  1   \n",
    "343  |  0  |  1  |  0  |  1  |  2  |  3  |  2  |  1  |  1  |  0  |  1  |  0  |  0  |  0  |  0   \n",
    "117  |  0  |  0  |  0  |  0  |  2  |  3  |  2  |  0  |  1  |  1  |  1  |  0  |  0  |  3  |  3   \n",
    "50  |  0  |  1  |  0  |  0  |  2  |  0  |  0  |  1  |  1  |  0  |  0  |  0  |  0  |  3  |  3   \n",
    "316  |  0  |  1  |  0  |  0  |  0  |  0  |  0  |  1  |  1  |  0  |  0  |  0  |  0  |  0  |  0   \n",
    "  \n",
    "在划分好数据集之后，接下来就是进行预测。在前面的实验中我们采用 Python 对决策树算法进行实现，下面我们通过 scikit-learn 来对其进行实现。 scikit-learn 决策树类 ` DecisionTreeClassifier(criterion='gini',  random_state=None)  ` 常用参数如下： \n",
    "\n",
    "  * ` criterion  ` 表示特征划分方法选择，默认为 gini (在后面会讲到)，可选择为 entropy (信息增益)。 \n",
    "\n",
    "  * ` ramdom_state  ` 表示随机数种子，当特征特别多时 scikit-learn 为了提高效率，随机选取部分特征来进行特征选择，即找到所有特征中较优的特征。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "c7904d0c",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>#sk-container-id-1 {\n",
       "  /* Definition of color scheme common for light and dark mode */\n",
       "  --sklearn-color-text: #000;\n",
       "  --sklearn-color-text-muted: #666;\n",
       "  --sklearn-color-line: gray;\n",
       "  /* Definition of color scheme for unfitted estimators */\n",
       "  --sklearn-color-unfitted-level-0: #fff5e6;\n",
       "  --sklearn-color-unfitted-level-1: #f6e4d2;\n",
       "  --sklearn-color-unfitted-level-2: #ffe0b3;\n",
       "  --sklearn-color-unfitted-level-3: chocolate;\n",
       "  /* Definition of color scheme for fitted estimators */\n",
       "  --sklearn-color-fitted-level-0: #f0f8ff;\n",
       "  --sklearn-color-fitted-level-1: #d4ebff;\n",
       "  --sklearn-color-fitted-level-2: #b3dbfd;\n",
       "  --sklearn-color-fitted-level-3: cornflowerblue;\n",
       "\n",
       "  /* Specific color for light theme */\n",
       "  --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
       "  --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, white)));\n",
       "  --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
       "  --sklearn-color-icon: #696969;\n",
       "\n",
       "  @media (prefers-color-scheme: dark) {\n",
       "    /* Redefinition of color scheme for dark theme */\n",
       "    --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
       "    --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, #111)));\n",
       "    --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
       "    --sklearn-color-icon: #878787;\n",
       "  }\n",
       "}\n",
       "\n",
       "#sk-container-id-1 {\n",
       "  color: var(--sklearn-color-text);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 pre {\n",
       "  padding: 0;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 input.sk-hidden--visually {\n",
       "  border: 0;\n",
       "  clip: rect(1px 1px 1px 1px);\n",
       "  clip: rect(1px, 1px, 1px, 1px);\n",
       "  height: 1px;\n",
       "  margin: -1px;\n",
       "  overflow: hidden;\n",
       "  padding: 0;\n",
       "  position: absolute;\n",
       "  width: 1px;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-dashed-wrapped {\n",
       "  border: 1px dashed var(--sklearn-color-line);\n",
       "  margin: 0 0.4em 0.5em 0.4em;\n",
       "  box-sizing: border-box;\n",
       "  padding-bottom: 0.4em;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-container {\n",
       "  /* jupyter's `normalize.less` sets `[hidden] { display: none; }`\n",
       "     but bootstrap.min.css set `[hidden] { display: none !important; }`\n",
       "     so we also need the `!important` here to be able to override the\n",
       "     default hidden behavior on the sphinx rendered scikit-learn.org.\n",
       "     See: https://github.com/scikit-learn/scikit-learn/issues/21755 */\n",
       "  display: inline-block !important;\n",
       "  position: relative;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-text-repr-fallback {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       "div.sk-parallel-item,\n",
       "div.sk-serial,\n",
       "div.sk-item {\n",
       "  /* draw centered vertical line to link estimators */\n",
       "  background-image: linear-gradient(var(--sklearn-color-text-on-default-background), var(--sklearn-color-text-on-default-background));\n",
       "  background-size: 2px 100%;\n",
       "  background-repeat: no-repeat;\n",
       "  background-position: center center;\n",
       "}\n",
       "\n",
       "/* Parallel-specific style estimator block */\n",
       "\n",
       "#sk-container-id-1 div.sk-parallel-item::after {\n",
       "  content: \"\";\n",
       "  width: 100%;\n",
       "  border-bottom: 2px solid var(--sklearn-color-text-on-default-background);\n",
       "  flex-grow: 1;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-parallel {\n",
       "  display: flex;\n",
       "  align-items: stretch;\n",
       "  justify-content: center;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  position: relative;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-parallel-item {\n",
       "  display: flex;\n",
       "  flex-direction: column;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-parallel-item:first-child::after {\n",
       "  align-self: flex-end;\n",
       "  width: 50%;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-parallel-item:last-child::after {\n",
       "  align-self: flex-start;\n",
       "  width: 50%;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-parallel-item:only-child::after {\n",
       "  width: 0;\n",
       "}\n",
       "\n",
       "/* Serial-specific style estimator block */\n",
       "\n",
       "#sk-container-id-1 div.sk-serial {\n",
       "  display: flex;\n",
       "  flex-direction: column;\n",
       "  align-items: center;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  padding-right: 1em;\n",
       "  padding-left: 1em;\n",
       "}\n",
       "\n",
       "\n",
       "/* Toggleable style: style used for estimator/Pipeline/ColumnTransformer box that is\n",
       "clickable and can be expanded/collapsed.\n",
       "- Pipeline and ColumnTransformer use this feature and define the default style\n",
       "- Estimators will overwrite some part of the style using the `sk-estimator` class\n",
       "*/\n",
       "\n",
       "/* Pipeline and ColumnTransformer style (default) */\n",
       "\n",
       "#sk-container-id-1 div.sk-toggleable {\n",
       "  /* Default theme specific background. It is overwritten whether we have a\n",
       "  specific estimator or a Pipeline/ColumnTransformer */\n",
       "  background-color: var(--sklearn-color-background);\n",
       "}\n",
       "\n",
       "/* Toggleable label */\n",
       "#sk-container-id-1 label.sk-toggleable__label {\n",
       "  cursor: pointer;\n",
       "  display: flex;\n",
       "  width: 100%;\n",
       "  margin-bottom: 0;\n",
       "  padding: 0.5em;\n",
       "  box-sizing: border-box;\n",
       "  text-align: center;\n",
       "  align-items: start;\n",
       "  justify-content: space-between;\n",
       "  gap: 0.5em;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 label.sk-toggleable__label .caption {\n",
       "  font-size: 0.6rem;\n",
       "  font-weight: lighter;\n",
       "  color: var(--sklearn-color-text-muted);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 label.sk-toggleable__label-arrow:before {\n",
       "  /* Arrow on the left of the label */\n",
       "  content: \"▸\";\n",
       "  float: left;\n",
       "  margin-right: 0.25em;\n",
       "  color: var(--sklearn-color-icon);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 label.sk-toggleable__label-arrow:hover:before {\n",
       "  color: var(--sklearn-color-text);\n",
       "}\n",
       "\n",
       "/* Toggleable content - dropdown */\n",
       "\n",
       "#sk-container-id-1 div.sk-toggleable__content {\n",
       "  max-height: 0;\n",
       "  max-width: 0;\n",
       "  overflow: hidden;\n",
       "  text-align: left;\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-toggleable__content.fitted {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-toggleable__content pre {\n",
       "  margin: 0.2em;\n",
       "  border-radius: 0.25em;\n",
       "  color: var(--sklearn-color-text);\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-toggleable__content.fitted pre {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 input.sk-toggleable__control:checked~div.sk-toggleable__content {\n",
       "  /* Expand drop-down */\n",
       "  max-height: 200px;\n",
       "  max-width: 100%;\n",
       "  overflow: auto;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {\n",
       "  content: \"▾\";\n",
       "}\n",
       "\n",
       "/* Pipeline/ColumnTransformer-specific style */\n",
       "\n",
       "#sk-container-id-1 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-label.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Estimator-specific style */\n",
       "\n",
       "/* Colorize estimator box */\n",
       "#sk-container-id-1 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-estimator.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-label label.sk-toggleable__label,\n",
       "#sk-container-id-1 div.sk-label label {\n",
       "  /* The background is the default theme color */\n",
       "  color: var(--sklearn-color-text-on-default-background);\n",
       "}\n",
       "\n",
       "/* On hover, darken the color of the background */\n",
       "#sk-container-id-1 div.sk-label:hover label.sk-toggleable__label {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "/* Label box, darken color on hover, fitted */\n",
       "#sk-container-id-1 div.sk-label.fitted:hover label.sk-toggleable__label.fitted {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Estimator label */\n",
       "\n",
       "#sk-container-id-1 div.sk-label label {\n",
       "  font-family: monospace;\n",
       "  font-weight: bold;\n",
       "  display: inline-block;\n",
       "  line-height: 1.2em;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-label-container {\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       "/* Estimator-specific */\n",
       "#sk-container-id-1 div.sk-estimator {\n",
       "  font-family: monospace;\n",
       "  border: 1px dotted var(--sklearn-color-border-box);\n",
       "  border-radius: 0.25em;\n",
       "  box-sizing: border-box;\n",
       "  margin-bottom: 0.5em;\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-estimator.fitted {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "/* on hover */\n",
       "#sk-container-id-1 div.sk-estimator:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-1 div.sk-estimator.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Specification for estimator info (e.g. \"i\" and \"?\") */\n",
       "\n",
       "/* Common style for \"i\" and \"?\" */\n",
       "\n",
       ".sk-estimator-doc-link,\n",
       "a:link.sk-estimator-doc-link,\n",
       "a:visited.sk-estimator-doc-link {\n",
       "  float: right;\n",
       "  font-size: smaller;\n",
       "  line-height: 1em;\n",
       "  font-family: monospace;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  border-radius: 1em;\n",
       "  height: 1em;\n",
       "  width: 1em;\n",
       "  text-decoration: none !important;\n",
       "  margin-left: 0.5em;\n",
       "  text-align: center;\n",
       "  /* unfitted */\n",
       "  border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-unfitted-level-1);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link.fitted,\n",
       "a:link.sk-estimator-doc-link.fitted,\n",
       "a:visited.sk-estimator-doc-link.fitted {\n",
       "  /* fitted */\n",
       "  border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-fitted-level-1);\n",
       "}\n",
       "\n",
       "/* On hover */\n",
       "div.sk-estimator:hover .sk-estimator-doc-link:hover,\n",
       ".sk-estimator-doc-link:hover,\n",
       "div.sk-label-container:hover .sk-estimator-doc-link:hover,\n",
       ".sk-estimator-doc-link:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "div.sk-estimator.fitted:hover .sk-estimator-doc-link.fitted:hover,\n",
       ".sk-estimator-doc-link.fitted:hover,\n",
       "div.sk-label-container:hover .sk-estimator-doc-link.fitted:hover,\n",
       ".sk-estimator-doc-link.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "/* Span, style for the box shown on hovering the info icon */\n",
       ".sk-estimator-doc-link span {\n",
       "  display: none;\n",
       "  z-index: 9999;\n",
       "  position: relative;\n",
       "  font-weight: normal;\n",
       "  right: .2ex;\n",
       "  padding: .5ex;\n",
       "  margin: .5ex;\n",
       "  width: min-content;\n",
       "  min-width: 20ex;\n",
       "  max-width: 50ex;\n",
       "  color: var(--sklearn-color-text);\n",
       "  box-shadow: 2pt 2pt 4pt #999;\n",
       "  /* unfitted */\n",
       "  background: var(--sklearn-color-unfitted-level-0);\n",
       "  border: .5pt solid var(--sklearn-color-unfitted-level-3);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link.fitted span {\n",
       "  /* fitted */\n",
       "  background: var(--sklearn-color-fitted-level-0);\n",
       "  border: var(--sklearn-color-fitted-level-3);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link:hover span {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       "/* \"?\"-specific style due to the `<a>` HTML tag */\n",
       "\n",
       "#sk-container-id-1 a.estimator_doc_link {\n",
       "  float: right;\n",
       "  font-size: 1rem;\n",
       "  line-height: 1em;\n",
       "  font-family: monospace;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  border-radius: 1rem;\n",
       "  height: 1rem;\n",
       "  width: 1rem;\n",
       "  text-decoration: none;\n",
       "  /* unfitted */\n",
       "  color: var(--sklearn-color-unfitted-level-1);\n",
       "  border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 a.estimator_doc_link.fitted {\n",
       "  /* fitted */\n",
       "  border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-fitted-level-1);\n",
       "}\n",
       "\n",
       "/* On hover */\n",
       "#sk-container-id-1 a.estimator_doc_link:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "#sk-container-id-1 a.estimator_doc_link.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-3);\n",
       "}\n",
       "</style><div id=\"sk-container-id-1\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>DecisionTreeClassifier(criterion=&#x27;entropy&#x27;, random_state=34)</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-1\" type=\"checkbox\" checked><label for=\"sk-estimator-id-1\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow\"><div><div>DecisionTreeClassifier</div></div><div><a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.6/modules/generated/sklearn.tree.DecisionTreeClassifier.html\">?<span>Documentation for DecisionTreeClassifier</span></a><span class=\"sk-estimator-doc-link fitted\">i<span>Fitted</span></span></div></label><div class=\"sk-toggleable__content fitted\"><pre>DecisionTreeClassifier(criterion=&#x27;entropy&#x27;, random_state=34)</pre></div> </div></div></div></div>"
      ],
      "text/plain": [
       "DecisionTreeClassifier(criterion='entropy', random_state=34)"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.tree import DecisionTreeClassifier\n",
    "\n",
    "dt_model = DecisionTreeClassifier(criterion=\"entropy\", random_state=34)\n",
    "dt_model.fit(X_train, y_train)  # 使用训练集训练模型"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "id": "87ac9ebb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>#sk-container-id-2 {\n",
       "  /* Definition of color scheme common for light and dark mode */\n",
       "  --sklearn-color-text: #000;\n",
       "  --sklearn-color-text-muted: #666;\n",
       "  --sklearn-color-line: gray;\n",
       "  /* Definition of color scheme for unfitted estimators */\n",
       "  --sklearn-color-unfitted-level-0: #fff5e6;\n",
       "  --sklearn-color-unfitted-level-1: #f6e4d2;\n",
       "  --sklearn-color-unfitted-level-2: #ffe0b3;\n",
       "  --sklearn-color-unfitted-level-3: chocolate;\n",
       "  /* Definition of color scheme for fitted estimators */\n",
       "  --sklearn-color-fitted-level-0: #f0f8ff;\n",
       "  --sklearn-color-fitted-level-1: #d4ebff;\n",
       "  --sklearn-color-fitted-level-2: #b3dbfd;\n",
       "  --sklearn-color-fitted-level-3: cornflowerblue;\n",
       "\n",
       "  /* Specific color for light theme */\n",
       "  --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
       "  --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, white)));\n",
       "  --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
       "  --sklearn-color-icon: #696969;\n",
       "\n",
       "  @media (prefers-color-scheme: dark) {\n",
       "    /* Redefinition of color scheme for dark theme */\n",
       "    --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
       "    --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, #111)));\n",
       "    --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
       "    --sklearn-color-icon: #878787;\n",
       "  }\n",
       "}\n",
       "\n",
       "#sk-container-id-2 {\n",
       "  color: var(--sklearn-color-text);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 pre {\n",
       "  padding: 0;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 input.sk-hidden--visually {\n",
       "  border: 0;\n",
       "  clip: rect(1px 1px 1px 1px);\n",
       "  clip: rect(1px, 1px, 1px, 1px);\n",
       "  height: 1px;\n",
       "  margin: -1px;\n",
       "  overflow: hidden;\n",
       "  padding: 0;\n",
       "  position: absolute;\n",
       "  width: 1px;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-dashed-wrapped {\n",
       "  border: 1px dashed var(--sklearn-color-line);\n",
       "  margin: 0 0.4em 0.5em 0.4em;\n",
       "  box-sizing: border-box;\n",
       "  padding-bottom: 0.4em;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-container {\n",
       "  /* jupyter's `normalize.less` sets `[hidden] { display: none; }`\n",
       "     but bootstrap.min.css set `[hidden] { display: none !important; }`\n",
       "     so we also need the `!important` here to be able to override the\n",
       "     default hidden behavior on the sphinx rendered scikit-learn.org.\n",
       "     See: https://github.com/scikit-learn/scikit-learn/issues/21755 */\n",
       "  display: inline-block !important;\n",
       "  position: relative;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-text-repr-fallback {\n",
       "  display: none;\n",
       "}\n",
       "\n",
       "div.sk-parallel-item,\n",
       "div.sk-serial,\n",
       "div.sk-item {\n",
       "  /* draw centered vertical line to link estimators */\n",
       "  background-image: linear-gradient(var(--sklearn-color-text-on-default-background), var(--sklearn-color-text-on-default-background));\n",
       "  background-size: 2px 100%;\n",
       "  background-repeat: no-repeat;\n",
       "  background-position: center center;\n",
       "}\n",
       "\n",
       "/* Parallel-specific style estimator block */\n",
       "\n",
       "#sk-container-id-2 div.sk-parallel-item::after {\n",
       "  content: \"\";\n",
       "  width: 100%;\n",
       "  border-bottom: 2px solid var(--sklearn-color-text-on-default-background);\n",
       "  flex-grow: 1;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-parallel {\n",
       "  display: flex;\n",
       "  align-items: stretch;\n",
       "  justify-content: center;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  position: relative;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-parallel-item {\n",
       "  display: flex;\n",
       "  flex-direction: column;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-parallel-item:first-child::after {\n",
       "  align-self: flex-end;\n",
       "  width: 50%;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-parallel-item:last-child::after {\n",
       "  align-self: flex-start;\n",
       "  width: 50%;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-parallel-item:only-child::after {\n",
       "  width: 0;\n",
       "}\n",
       "\n",
       "/* Serial-specific style estimator block */\n",
       "\n",
       "#sk-container-id-2 div.sk-serial {\n",
       "  display: flex;\n",
       "  flex-direction: column;\n",
       "  align-items: center;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  padding-right: 1em;\n",
       "  padding-left: 1em;\n",
       "}\n",
       "\n",
       "\n",
       "/* Toggleable style: style used for estimator/Pipeline/ColumnTransformer box that is\n",
       "clickable and can be expanded/collapsed.\n",
       "- Pipeline and ColumnTransformer use this feature and define the default style\n",
       "- Estimators will overwrite some part of the style using the `sk-estimator` class\n",
       "*/\n",
       "\n",
       "/* Pipeline and ColumnTransformer style (default) */\n",
       "\n",
       "#sk-container-id-2 div.sk-toggleable {\n",
       "  /* Default theme specific background. It is overwritten whether we have a\n",
       "  specific estimator or a Pipeline/ColumnTransformer */\n",
       "  background-color: var(--sklearn-color-background);\n",
       "}\n",
       "\n",
       "/* Toggleable label */\n",
       "#sk-container-id-2 label.sk-toggleable__label {\n",
       "  cursor: pointer;\n",
       "  display: flex;\n",
       "  width: 100%;\n",
       "  margin-bottom: 0;\n",
       "  padding: 0.5em;\n",
       "  box-sizing: border-box;\n",
       "  text-align: center;\n",
       "  align-items: start;\n",
       "  justify-content: space-between;\n",
       "  gap: 0.5em;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 label.sk-toggleable__label .caption {\n",
       "  font-size: 0.6rem;\n",
       "  font-weight: lighter;\n",
       "  color: var(--sklearn-color-text-muted);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 label.sk-toggleable__label-arrow:before {\n",
       "  /* Arrow on the left of the label */\n",
       "  content: \"▸\";\n",
       "  float: left;\n",
       "  margin-right: 0.25em;\n",
       "  color: var(--sklearn-color-icon);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 label.sk-toggleable__label-arrow:hover:before {\n",
       "  color: var(--sklearn-color-text);\n",
       "}\n",
       "\n",
       "/* Toggleable content - dropdown */\n",
       "\n",
       "#sk-container-id-2 div.sk-toggleable__content {\n",
       "  max-height: 0;\n",
       "  max-width: 0;\n",
       "  overflow: hidden;\n",
       "  text-align: left;\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-toggleable__content.fitted {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-toggleable__content pre {\n",
       "  margin: 0.2em;\n",
       "  border-radius: 0.25em;\n",
       "  color: var(--sklearn-color-text);\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-toggleable__content.fitted pre {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 input.sk-toggleable__control:checked~div.sk-toggleable__content {\n",
       "  /* Expand drop-down */\n",
       "  max-height: 200px;\n",
       "  max-width: 100%;\n",
       "  overflow: auto;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {\n",
       "  content: \"▾\";\n",
       "}\n",
       "\n",
       "/* Pipeline/ColumnTransformer-specific style */\n",
       "\n",
       "#sk-container-id-2 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-label.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Estimator-specific style */\n",
       "\n",
       "/* Colorize estimator box */\n",
       "#sk-container-id-2 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-estimator.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-label label.sk-toggleable__label,\n",
       "#sk-container-id-2 div.sk-label label {\n",
       "  /* The background is the default theme color */\n",
       "  color: var(--sklearn-color-text-on-default-background);\n",
       "}\n",
       "\n",
       "/* On hover, darken the color of the background */\n",
       "#sk-container-id-2 div.sk-label:hover label.sk-toggleable__label {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "/* Label box, darken color on hover, fitted */\n",
       "#sk-container-id-2 div.sk-label.fitted:hover label.sk-toggleable__label.fitted {\n",
       "  color: var(--sklearn-color-text);\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Estimator label */\n",
       "\n",
       "#sk-container-id-2 div.sk-label label {\n",
       "  font-family: monospace;\n",
       "  font-weight: bold;\n",
       "  display: inline-block;\n",
       "  line-height: 1.2em;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-label-container {\n",
       "  text-align: center;\n",
       "}\n",
       "\n",
       "/* Estimator-specific */\n",
       "#sk-container-id-2 div.sk-estimator {\n",
       "  font-family: monospace;\n",
       "  border: 1px dotted var(--sklearn-color-border-box);\n",
       "  border-radius: 0.25em;\n",
       "  box-sizing: border-box;\n",
       "  margin-bottom: 0.5em;\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-0);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-estimator.fitted {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-0);\n",
       "}\n",
       "\n",
       "/* on hover */\n",
       "#sk-container-id-2 div.sk-estimator:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-2);\n",
       "}\n",
       "\n",
       "#sk-container-id-2 div.sk-estimator.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-2);\n",
       "}\n",
       "\n",
       "/* Specification for estimator info (e.g. \"i\" and \"?\") */\n",
       "\n",
       "/* Common style for \"i\" and \"?\" */\n",
       "\n",
       ".sk-estimator-doc-link,\n",
       "a:link.sk-estimator-doc-link,\n",
       "a:visited.sk-estimator-doc-link {\n",
       "  float: right;\n",
       "  font-size: smaller;\n",
       "  line-height: 1em;\n",
       "  font-family: monospace;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  border-radius: 1em;\n",
       "  height: 1em;\n",
       "  width: 1em;\n",
       "  text-decoration: none !important;\n",
       "  margin-left: 0.5em;\n",
       "  text-align: center;\n",
       "  /* unfitted */\n",
       "  border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-unfitted-level-1);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link.fitted,\n",
       "a:link.sk-estimator-doc-link.fitted,\n",
       "a:visited.sk-estimator-doc-link.fitted {\n",
       "  /* fitted */\n",
       "  border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-fitted-level-1);\n",
       "}\n",
       "\n",
       "/* On hover */\n",
       "div.sk-estimator:hover .sk-estimator-doc-link:hover,\n",
       ".sk-estimator-doc-link:hover,\n",
       "div.sk-label-container:hover .sk-estimator-doc-link:hover,\n",
       ".sk-estimator-doc-link:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "div.sk-estimator.fitted:hover .sk-estimator-doc-link.fitted:hover,\n",
       ".sk-estimator-doc-link.fitted:hover,\n",
       "div.sk-label-container:hover .sk-estimator-doc-link.fitted:hover,\n",
       ".sk-estimator-doc-link.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "/* Span, style for the box shown on hovering the info icon */\n",
       ".sk-estimator-doc-link span {\n",
       "  display: none;\n",
       "  z-index: 9999;\n",
       "  position: relative;\n",
       "  font-weight: normal;\n",
       "  right: .2ex;\n",
       "  padding: .5ex;\n",
       "  margin: .5ex;\n",
       "  width: min-content;\n",
       "  min-width: 20ex;\n",
       "  max-width: 50ex;\n",
       "  color: var(--sklearn-color-text);\n",
       "  box-shadow: 2pt 2pt 4pt #999;\n",
       "  /* unfitted */\n",
       "  background: var(--sklearn-color-unfitted-level-0);\n",
       "  border: .5pt solid var(--sklearn-color-unfitted-level-3);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link.fitted span {\n",
       "  /* fitted */\n",
       "  background: var(--sklearn-color-fitted-level-0);\n",
       "  border: var(--sklearn-color-fitted-level-3);\n",
       "}\n",
       "\n",
       ".sk-estimator-doc-link:hover span {\n",
       "  display: block;\n",
       "}\n",
       "\n",
       "/* \"?\"-specific style due to the `<a>` HTML tag */\n",
       "\n",
       "#sk-container-id-2 a.estimator_doc_link {\n",
       "  float: right;\n",
       "  font-size: 1rem;\n",
       "  line-height: 1em;\n",
       "  font-family: monospace;\n",
       "  background-color: var(--sklearn-color-background);\n",
       "  border-radius: 1rem;\n",
       "  height: 1rem;\n",
       "  width: 1rem;\n",
       "  text-decoration: none;\n",
       "  /* unfitted */\n",
       "  color: var(--sklearn-color-unfitted-level-1);\n",
       "  border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 a.estimator_doc_link.fitted {\n",
       "  /* fitted */\n",
       "  border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
       "  color: var(--sklearn-color-fitted-level-1);\n",
       "}\n",
       "\n",
       "/* On hover */\n",
       "#sk-container-id-2 a.estimator_doc_link:hover {\n",
       "  /* unfitted */\n",
       "  background-color: var(--sklearn-color-unfitted-level-3);\n",
       "  color: var(--sklearn-color-background);\n",
       "  text-decoration: none;\n",
       "}\n",
       "\n",
       "#sk-container-id-2 a.estimator_doc_link.fitted:hover {\n",
       "  /* fitted */\n",
       "  background-color: var(--sklearn-color-fitted-level-3);\n",
       "}\n",
       "</style><div id=\"sk-container-id-2\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>DecisionTreeClassifier(criterion=&#x27;entropy&#x27;, random_state=34)</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item\"><div class=\"sk-estimator  sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-2\" type=\"checkbox\" checked><label for=\"sk-estimator-id-2\" class=\"sk-toggleable__label  sk-toggleable__label-arrow\"><div><div>DecisionTreeClassifier</div></div><div><a class=\"sk-estimator-doc-link \" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.6/modules/generated/sklearn.tree.DecisionTreeClassifier.html\">?<span>Documentation for DecisionTreeClassifier</span></a><span class=\"sk-estimator-doc-link \">i<span>Not fitted</span></span></div></label><div class=\"sk-toggleable__content \"><pre>DecisionTreeClassifier(criterion=&#x27;entropy&#x27;, random_state=34)</pre></div> </div></div></div></div>"
      ],
      "text/plain": [
       "DecisionTreeClassifier(criterion='entropy', random_state=34)"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "DecisionTreeClassifier(criterion='entropy', random_state=34)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "72a2aa04",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "source": [
    "##  19.13.  决策树可视化  # \n",
    "\n",
    "在构建好决策树之后，我们需要对创建好的决策树进行可视化展示，引入 ` export_graphviz  ` 进行画图。 \n",
    "\n",
    "下面开始生成决策树图像，其中生成决策树较大需要拖动滑动条进行查看。 \n",
    "\n",
    "Note \n",
    "\n",
    "pip install graphviz # 安装 graphviz 可视化库 brew install graphviz # macOS 安装 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "id": "9d12fd6d",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The following packages are already present in the pyproject.toml and will be skipped:\n",
      "\n",
      "  - graphviz\n",
      "\n",
      "If you want to update it to the latest compatible version, you can use `poetry update package`.\n",
      "If you prefer to upgrade it to the latest available version, you can use `poetry add package@latest`.\n",
      "\n",
      "Nothing to add.\n"
     ]
    }
   ],
   "source": [
    "!poetry add graphviz"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "id": "0f16e357",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 12.2.1 (20241206.2353)\n",
       " -->\n",
       "<!-- Title: Tree Pages: 1 -->\n",
       "<svg width=\"4193pt\" height=\"2034pt\"\n",
       " viewBox=\"0.00 0.00 4192.75 2033.75\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 2029.75)\">\n",
       "<title>Tree</title>\n",
       "<polygon fill=\"white\" stroke=\"none\" points=\"-4,4 -4,-2029.75 4188.75,-2029.75 4188.75,4 -4,4\"/>\n",
       "<!-- 0 -->\n",
       "<g id=\"node1\" class=\"node\">\n",
       "<title>0</title>\n",
       "<path fill=\"#c0e0f7\" stroke=\"black\" d=\"M1793.75,-2025.75C1793.75,-2025.75 1656.25,-2025.75 1656.25,-2025.75 1650.25,-2025.75 1644.25,-2019.75 1644.25,-2013.75 1644.25,-2013.75 1644.25,-1935.25 1644.25,-1935.25 1644.25,-1929.25 1650.25,-1923.25 1656.25,-1923.25 1656.25,-1923.25 1793.75,-1923.25 1793.75,-1923.25 1799.75,-1923.25 1805.75,-1929.25 1805.75,-1935.25 1805.75,-1935.25 1805.75,-2013.75 1805.75,-2013.75 1805.75,-2019.75 1799.75,-2025.75 1793.75,-2025.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"1725\" y=\"-2008.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #0</text>\n",
       "<text text-anchor=\"middle\" x=\"1725\" y=\"-1992.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">G2 &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1725\" y=\"-1976.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.775</text>\n",
       "<text text-anchor=\"middle\" x=\"1725\" y=\"-1961.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 276</text>\n",
       "<text text-anchor=\"middle\" x=\"1725\" y=\"-1945.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [54, 25, 132, 65]</text>\n",
       "<text text-anchor=\"middle\" x=\"1725\" y=\"-1929.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 1 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>1</title>\n",
       "<path fill=\"#e58139\" stroke=\"black\" d=\"M1698.75,-1879.38C1698.75,-1879.38 1591.25,-1879.38 1591.25,-1879.38 1585.25,-1879.38 1579.25,-1873.38 1579.25,-1867.38 1579.25,-1867.38 1579.25,-1804.62 1579.25,-1804.62 1579.25,-1798.62 1585.25,-1792.62 1591.25,-1792.62 1591.25,-1792.62 1698.75,-1792.62 1698.75,-1792.62 1704.75,-1792.62 1710.75,-1798.62 1710.75,-1804.62 1710.75,-1804.62 1710.75,-1867.38 1710.75,-1867.38 1710.75,-1873.38 1704.75,-1879.38 1698.75,-1879.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"1645\" y=\"-1862.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #1</text>\n",
       "<text text-anchor=\"middle\" x=\"1645\" y=\"-1846.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1645\" y=\"-1830.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 48</text>\n",
       "<text text-anchor=\"middle\" x=\"1645\" y=\"-1814.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [48, 0, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1645\" y=\"-1799.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = bad</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;1 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>0&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1695.44,-1923.06C1689.03,-1912.13 1682.24,-1900.54 1675.79,-1889.53\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1678.82,-1887.78 1670.74,-1880.93 1672.78,-1891.32 1678.82,-1887.78\"/>\n",
       "<text text-anchor=\"middle\" x=\"1663.67\" y=\"-1898.38\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">True</text>\n",
       "</g>\n",
       "<!-- 2 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>2</title>\n",
       "<path fill=\"#aed7f4\" stroke=\"black\" d=\"M1871,-1887.25C1871,-1887.25 1741,-1887.25 1741,-1887.25 1735,-1887.25 1729,-1881.25 1729,-1875.25 1729,-1875.25 1729,-1796.75 1729,-1796.75 1729,-1790.75 1735,-1784.75 1741,-1784.75 1741,-1784.75 1871,-1784.75 1871,-1784.75 1877,-1784.75 1883,-1790.75 1883,-1796.75 1883,-1796.75 1883,-1875.25 1883,-1875.25 1883,-1881.25 1877,-1887.25 1871,-1887.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"1806\" y=\"-1869.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #2</text>\n",
       "<text text-anchor=\"middle\" x=\"1806\" y=\"-1854.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">G2 &lt;= 2.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1806\" y=\"-1838.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.46</text>\n",
       "<text text-anchor=\"middle\" x=\"1806\" y=\"-1822.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 228</text>\n",
       "<text text-anchor=\"middle\" x=\"1806\" y=\"-1806.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [6, 25, 132, 65]</text>\n",
       "<text text-anchor=\"middle\" x=\"1806\" y=\"-1791.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;2 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>0&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1754.93,-1923.06C1759.85,-1914.76 1765,-1906.09 1770.05,-1897.58\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1773.06,-1899.38 1775.15,-1888.99 1767.04,-1895.8 1773.06,-1899.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"1782.1\" y=\"-1906.49\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">False</text>\n",
       "</g>\n",
       "<!-- 3 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>3</title>\n",
       "<path fill=\"#5baeea\" stroke=\"black\" d=\"M1199.88,-1748.75C1199.88,-1748.75 1078.12,-1748.75 1078.12,-1748.75 1072.12,-1748.75 1066.12,-1742.75 1066.12,-1736.75 1066.12,-1736.75 1066.12,-1658.25 1066.12,-1658.25 1066.12,-1652.25 1072.12,-1646.25 1078.12,-1646.25 1078.12,-1646.25 1199.88,-1646.25 1199.88,-1646.25 1205.88,-1646.25 1211.88,-1652.25 1211.88,-1658.25 1211.88,-1658.25 1211.88,-1736.75 1211.88,-1736.75 1211.88,-1742.75 1205.88,-1748.75 1199.88,-1748.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1731.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #3</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1715.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">G2 &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1699.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.857</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1684.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 139</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1668.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [6, 12, 117, 4]</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1652.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;3 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>2&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1728.83,-1788.14C1725.89,-1786.92 1722.94,-1785.78 1720,-1784.75 1550.32,-1725.09 1338.66,-1706.7 1223.41,-1701.03\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1223.89,-1697.55 1213.73,-1700.57 1223.56,-1704.54 1223.89,-1697.55\"/>\n",
       "</g>\n",
       "<!-- 76 -->\n",
       "<g id=\"node77\" class=\"node\">\n",
       "<title>76</title>\n",
       "<path fill=\"#e684ef\" stroke=\"black\" d=\"M2534.25,-1748.75C2534.25,-1748.75 2411.75,-1748.75 2411.75,-1748.75 2405.75,-1748.75 2399.75,-1742.75 2399.75,-1736.75 2399.75,-1736.75 2399.75,-1658.25 2399.75,-1658.25 2399.75,-1652.25 2405.75,-1646.25 2411.75,-1646.25 2411.75,-1646.25 2534.25,-1646.25 2534.25,-1646.25 2540.25,-1646.25 2546.25,-1652.25 2546.25,-1658.25 2546.25,-1658.25 2546.25,-1736.75 2546.25,-1736.75 2546.25,-1742.75 2540.25,-1748.75 2534.25,-1748.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1731.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #76</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1715.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">famsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1699.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.212</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1684.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 89</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1668.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 13, 15, 61]</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1652.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;76 -->\n",
       "<g id=\"edge76\" class=\"edge\">\n",
       "<title>2&#45;&gt;76</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1883.49,-1819.14C2009.49,-1793.36 2257.81,-1742.54 2388.31,-1715.83\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2388.83,-1719.3 2397.93,-1713.86 2387.43,-1712.44 2388.83,-1719.3\"/>\n",
       "</g>\n",
       "<!-- 4 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>4</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M1039.75,-1602.38C1039.75,-1602.38 932.25,-1602.38 932.25,-1602.38 926.25,-1602.38 920.25,-1596.38 920.25,-1590.38 920.25,-1590.38 920.25,-1527.62 920.25,-1527.62 920.25,-1521.62 926.25,-1515.62 932.25,-1515.62 932.25,-1515.62 1039.75,-1515.62 1039.75,-1515.62 1045.75,-1515.62 1051.75,-1521.62 1051.75,-1527.62 1051.75,-1527.62 1051.75,-1590.38 1051.75,-1590.38 1051.75,-1596.38 1045.75,-1602.38 1039.75,-1602.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"986\" y=\"-1585.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #4</text>\n",
       "<text text-anchor=\"middle\" x=\"986\" y=\"-1569.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"986\" y=\"-1553.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 10</text>\n",
       "<text text-anchor=\"middle\" x=\"986\" y=\"-1537.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 10, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"986\" y=\"-1522.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;4 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>3&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1082.46,-1646.06C1069.34,-1634.35 1055.36,-1621.88 1042.25,-1610.18\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1044.69,-1607.67 1034.9,-1603.63 1040.03,-1612.9 1044.69,-1607.67\"/>\n",
       "</g>\n",
       "<!-- 5 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>5</title>\n",
       "<path fill=\"#4ca7e8\" stroke=\"black\" d=\"M1196.12,-1610.25C1196.12,-1610.25 1081.88,-1610.25 1081.88,-1610.25 1075.88,-1610.25 1069.88,-1604.25 1069.88,-1598.25 1069.88,-1598.25 1069.88,-1519.75 1069.88,-1519.75 1069.88,-1513.75 1075.88,-1507.75 1081.88,-1507.75 1081.88,-1507.75 1196.12,-1507.75 1196.12,-1507.75 1202.12,-1507.75 1208.12,-1513.75 1208.12,-1519.75 1208.12,-1519.75 1208.12,-1598.25 1208.12,-1598.25 1208.12,-1604.25 1202.12,-1610.25 1196.12,-1610.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1592.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #5</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1577.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">G1 &lt;= 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1561.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.582</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1545.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 129</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1529.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [6, 2, 117, 4]</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1514.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;5 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>3&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1139,-1646.06C1139,-1638.21 1139,-1630.03 1139,-1621.96\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1142.5,-1622.2 1139,-1612.2 1135.5,-1622.2 1142.5,-1622.2\"/>\n",
       "</g>\n",
       "<!-- 6 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>6</title>\n",
       "<path fill=\"#83c2ef\" stroke=\"black\" d=\"M355,-1471.75C355,-1471.75 255,-1471.75 255,-1471.75 249,-1471.75 243,-1465.75 243,-1459.75 243,-1459.75 243,-1381.25 243,-1381.25 243,-1375.25 249,-1369.25 255,-1369.25 255,-1369.25 355,-1369.25 355,-1369.25 361,-1369.25 367,-1375.25 367,-1381.25 367,-1381.25 367,-1459.75 367,-1459.75 367,-1465.75 361,-1471.75 355,-1471.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1454.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #6</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1438.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">famsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1422.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.845</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1407.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 11</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1391.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [3, 0, 8, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1375.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;6 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>5&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1069.64,-1511.19C1066.77,-1509.93 1063.88,-1508.78 1061,-1507.75 936.32,-1463.23 543.42,-1435.55 378.75,-1425.63\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"379,-1422.14 368.81,-1425.04 378.58,-1429.13 379,-1422.14\"/>\n",
       "</g>\n",
       "<!-- 15 -->\n",
       "<g id=\"node16\" class=\"node\">\n",
       "<title>15</title>\n",
       "<path fill=\"#49a5e7\" stroke=\"black\" d=\"M1196.5,-1471.75C1196.5,-1471.75 1081.5,-1471.75 1081.5,-1471.75 1075.5,-1471.75 1069.5,-1465.75 1069.5,-1459.75 1069.5,-1459.75 1069.5,-1381.25 1069.5,-1381.25 1069.5,-1375.25 1075.5,-1369.25 1081.5,-1369.25 1081.5,-1369.25 1196.5,-1369.25 1196.5,-1369.25 1202.5,-1369.25 1208.5,-1375.25 1208.5,-1381.25 1208.5,-1381.25 1208.5,-1459.75 1208.5,-1459.75 1208.5,-1465.75 1202.5,-1471.75 1196.5,-1471.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1454.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #15</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1438.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">G1 &lt;= 2.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1422.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.506</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1407.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 118</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1391.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [3, 2, 109, 4]</text>\n",
       "<text text-anchor=\"middle\" x=\"1139\" y=\"-1375.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;15 -->\n",
       "<g id=\"edge15\" class=\"edge\">\n",
       "<title>5&#45;&gt;15</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1139,-1507.56C1139,-1499.71 1139,-1491.53 1139,-1483.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1142.5,-1483.7 1139,-1473.7 1135.5,-1483.7 1142.5,-1483.7\"/>\n",
       "</g>\n",
       "<!-- 7 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>7</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M213,-1325.38C213,-1325.38 113,-1325.38 113,-1325.38 107,-1325.38 101,-1319.38 101,-1313.38 101,-1313.38 101,-1250.62 101,-1250.62 101,-1244.62 107,-1238.62 113,-1238.62 113,-1238.62 213,-1238.62 213,-1238.62 219,-1238.62 225,-1244.62 225,-1250.62 225,-1250.62 225,-1313.38 225,-1313.38 225,-1319.38 219,-1325.38 213,-1325.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1308.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #7</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1292.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1276.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 5</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1260.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 5, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1245.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;7 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>6&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M252.53,-1369.06C240.46,-1357.46 227.62,-1345.12 215.55,-1333.52\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"218.06,-1331.07 208.43,-1326.67 213.21,-1336.12 218.06,-1331.07\"/>\n",
       "</g>\n",
       "<!-- 8 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>8</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M355,-1333.25C355,-1333.25 255,-1333.25 255,-1333.25 249,-1333.25 243,-1327.25 243,-1321.25 243,-1321.25 243,-1242.75 243,-1242.75 243,-1236.75 249,-1230.75 255,-1230.75 255,-1230.75 355,-1230.75 355,-1230.75 361,-1230.75 367,-1236.75 367,-1242.75 367,-1242.75 367,-1321.25 367,-1321.25 367,-1327.25 361,-1333.25 355,-1333.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1315.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #8</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1300.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">guardian &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1284.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1268.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 6</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1252.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [3, 0, 3, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1237.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = bad</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;8 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>6&#45;&gt;8</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M305,-1369.06C305,-1361.21 305,-1353.03 305,-1344.96\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"308.5,-1345.2 305,-1335.2 301.5,-1345.2 308.5,-1345.2\"/>\n",
       "</g>\n",
       "<!-- 9 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>9</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M213,-1186.88C213,-1186.88 113,-1186.88 113,-1186.88 107,-1186.88 101,-1180.88 101,-1174.88 101,-1174.88 101,-1112.12 101,-1112.12 101,-1106.12 107,-1100.12 113,-1100.12 113,-1100.12 213,-1100.12 213,-1100.12 219,-1100.12 225,-1106.12 225,-1112.12 225,-1112.12 225,-1174.88 225,-1174.88 225,-1180.88 219,-1186.88 213,-1186.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1169.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #9</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1153.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1138.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1122.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1106.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 8&#45;&gt;9 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>8&#45;&gt;9</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M252.53,-1230.56C240.46,-1218.96 227.62,-1206.62 215.55,-1195.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"218.06,-1192.57 208.43,-1188.17 213.21,-1197.62 218.06,-1192.57\"/>\n",
       "</g>\n",
       "<!-- 10 -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>10</title>\n",
       "<path fill=\"#f6d5bd\" stroke=\"black\" d=\"M355,-1194.75C355,-1194.75 255,-1194.75 255,-1194.75 249,-1194.75 243,-1188.75 243,-1182.75 243,-1182.75 243,-1104.25 243,-1104.25 243,-1098.25 249,-1092.25 255,-1092.25 255,-1092.25 355,-1092.25 355,-1092.25 361,-1092.25 367,-1098.25 367,-1104.25 367,-1104.25 367,-1182.75 367,-1182.75 367,-1188.75 361,-1194.75 355,-1194.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1177.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #10</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1161.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1145.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.971</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1130.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 5</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1114.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [3, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1098.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = bad</text>\n",
       "</g>\n",
       "<!-- 8&#45;&gt;10 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>8&#45;&gt;10</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M305,-1230.56C305,-1222.71 305,-1214.53 305,-1206.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"308.5,-1206.7 305,-1196.7 301.5,-1206.7 308.5,-1206.7\"/>\n",
       "</g>\n",
       "<!-- 11 -->\n",
       "<g id=\"node12\" class=\"node\">\n",
       "<title>11</title>\n",
       "<path fill=\"#9ccef2\" stroke=\"black\" d=\"M213,-1056.25C213,-1056.25 113,-1056.25 113,-1056.25 107,-1056.25 101,-1050.25 101,-1044.25 101,-1044.25 101,-965.75 101,-965.75 101,-959.75 107,-953.75 113,-953.75 113,-953.75 213,-953.75 213,-953.75 219,-953.75 225,-959.75 225,-965.75 225,-965.75 225,-1044.25 225,-1044.25 225,-1050.25 219,-1056.25 213,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #11</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Pedu &lt;= 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"163\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 10&#45;&gt;11 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>10&#45;&gt;11</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M252.53,-1092.06C243.24,-1083.13 233.5,-1073.77 224,-1064.64\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"226.46,-1062.14 216.82,-1057.74 221.61,-1067.19 226.46,-1062.14\"/>\n",
       "</g>\n",
       "<!-- 14 -->\n",
       "<g id=\"node15\" class=\"node\">\n",
       "<title>14</title>\n",
       "<path fill=\"#e58139\" stroke=\"black\" d=\"M355,-1048.38C355,-1048.38 255,-1048.38 255,-1048.38 249,-1048.38 243,-1042.38 243,-1036.38 243,-1036.38 243,-973.62 243,-973.62 243,-967.62 249,-961.62 255,-961.62 255,-961.62 355,-961.62 355,-961.62 361,-961.62 367,-967.62 367,-973.62 367,-973.62 367,-1036.38 367,-1036.38 367,-1042.38 361,-1048.38 355,-1048.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1031.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #14</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-1015.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-999.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-983.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [2, 0, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"305\" y=\"-968.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = bad</text>\n",
       "</g>\n",
       "<!-- 10&#45;&gt;14 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>10&#45;&gt;14</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M305,-1092.06C305,-1081.58 305,-1070.49 305,-1059.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"308.5,-1060.13 305,-1050.13 301.5,-1060.13 308.5,-1060.13\"/>\n",
       "</g>\n",
       "<!-- 12 -->\n",
       "<g id=\"node13\" class=\"node\">\n",
       "<title>12</title>\n",
       "<path fill=\"#e58139\" stroke=\"black\" d=\"M112,-909.88C112,-909.88 12,-909.88 12,-909.88 6,-909.88 0,-903.88 0,-897.88 0,-897.88 0,-835.12 0,-835.12 0,-829.12 6,-823.12 12,-823.12 12,-823.12 112,-823.12 112,-823.12 118,-823.12 124,-829.12 124,-835.12 124,-835.12 124,-897.88 124,-897.88 124,-903.88 118,-909.88 112,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"62\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #12</text>\n",
       "<text text-anchor=\"middle\" x=\"62\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"62\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"62\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"62\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = bad</text>\n",
       "</g>\n",
       "<!-- 11&#45;&gt;12 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>11&#45;&gt;12</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M125.68,-953.56C117.42,-942.41 108.67,-930.57 100.37,-919.36\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"103.2,-917.29 94.44,-911.34 97.57,-921.46 103.2,-917.29\"/>\n",
       "</g>\n",
       "<!-- 13 -->\n",
       "<g id=\"node14\" class=\"node\">\n",
       "<title>13</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M254,-909.88C254,-909.88 154,-909.88 154,-909.88 148,-909.88 142,-903.88 142,-897.88 142,-897.88 142,-835.12 142,-835.12 142,-829.12 148,-823.12 154,-823.12 154,-823.12 254,-823.12 254,-823.12 260,-823.12 266,-829.12 266,-835.12 266,-835.12 266,-897.88 266,-897.88 266,-903.88 260,-909.88 254,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"204\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #13</text>\n",
       "<text text-anchor=\"middle\" x=\"204\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"204\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"204\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"204\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 11&#45;&gt;13 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>11&#45;&gt;13</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M178.15,-953.56C181.33,-942.96 184.7,-931.75 187.92,-921.05\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"191.24,-922.15 190.76,-911.57 184.53,-920.14 191.24,-922.15\"/>\n",
       "</g>\n",
       "<!-- 16 -->\n",
       "<g id=\"node17\" class=\"node\">\n",
       "<title>16</title>\n",
       "<path fill=\"#46a3e7\" stroke=\"black\" d=\"M973.25,-1333.25C973.25,-1333.25 820.75,-1333.25 820.75,-1333.25 814.75,-1333.25 808.75,-1327.25 808.75,-1321.25 808.75,-1321.25 808.75,-1242.75 808.75,-1242.75 808.75,-1236.75 814.75,-1230.75 820.75,-1230.75 820.75,-1230.75 973.25,-1230.75 973.25,-1230.75 979.25,-1230.75 985.25,-1236.75 985.25,-1242.75 985.25,-1242.75 985.25,-1321.25 985.25,-1321.25 985.25,-1327.25 979.25,-1333.25 973.25,-1333.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"897\" y=\"-1315.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #16</text>\n",
       "<text text-anchor=\"middle\" x=\"897\" y=\"-1300.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Pedu &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"897\" y=\"-1284.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.422</text>\n",
       "<text text-anchor=\"middle\" x=\"897\" y=\"-1268.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 98</text>\n",
       "<text text-anchor=\"middle\" x=\"897\" y=\"-1252.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [3.0, 1.0, 92.0, 2.0]</text>\n",
       "<text text-anchor=\"middle\" x=\"897\" y=\"-1237.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 15&#45;&gt;16 -->\n",
       "<g id=\"edge16\" class=\"edge\">\n",
       "<title>15&#45;&gt;16</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1069,-1380.02C1045.96,-1367.02 1019.89,-1352.32 995.15,-1338.36\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"997.12,-1335.46 986.69,-1333.59 993.68,-1341.55 997.12,-1335.46\"/>\n",
       "</g>\n",
       "<!-- 63 -->\n",
       "<g id=\"node64\" class=\"node\">\n",
       "<title>63</title>\n",
       "<path fill=\"#5aade9\" stroke=\"black\" d=\"M1479.75,-1333.25C1479.75,-1333.25 1372.25,-1333.25 1372.25,-1333.25 1366.25,-1333.25 1360.25,-1327.25 1360.25,-1321.25 1360.25,-1321.25 1360.25,-1242.75 1360.25,-1242.75 1360.25,-1236.75 1366.25,-1230.75 1372.25,-1230.75 1372.25,-1230.75 1479.75,-1230.75 1479.75,-1230.75 1485.75,-1230.75 1491.75,-1236.75 1491.75,-1242.75 1491.75,-1242.75 1491.75,-1321.25 1491.75,-1321.25 1491.75,-1327.25 1485.75,-1333.25 1479.75,-1333.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"1426\" y=\"-1315.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #63</text>\n",
       "<text text-anchor=\"middle\" x=\"1426\" y=\"-1300.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">studytime &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1426\" y=\"-1284.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.748</text>\n",
       "<text text-anchor=\"middle\" x=\"1426\" y=\"-1268.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 20</text>\n",
       "<text text-anchor=\"middle\" x=\"1426\" y=\"-1252.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 17, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"1426\" y=\"-1237.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 15&#45;&gt;63 -->\n",
       "<g id=\"edge63\" class=\"edge\">\n",
       "<title>15&#45;&gt;63</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1208.84,-1386.28C1251.39,-1366.05 1305.79,-1340.17 1349.5,-1319.38\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1350.9,-1322.59 1358.43,-1315.14 1347.9,-1316.27 1350.9,-1322.59\"/>\n",
       "</g>\n",
       "<!-- 17 -->\n",
       "<g id=\"node18\" class=\"node\">\n",
       "<title>17</title>\n",
       "<path fill=\"#3fa0e6\" stroke=\"black\" d=\"M654.75,-1194.75C654.75,-1194.75 547.25,-1194.75 547.25,-1194.75 541.25,-1194.75 535.25,-1188.75 535.25,-1182.75 535.25,-1182.75 535.25,-1104.25 535.25,-1104.25 535.25,-1098.25 541.25,-1092.25 547.25,-1092.25 547.25,-1092.25 654.75,-1092.25 654.75,-1092.25 660.75,-1092.25 666.75,-1098.25 666.75,-1104.25 666.75,-1104.25 666.75,-1182.75 666.75,-1182.75 666.75,-1188.75 660.75,-1194.75 654.75,-1194.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"601\" y=\"-1177.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #17</text>\n",
       "<text text-anchor=\"middle\" x=\"601\" y=\"-1161.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">guardian &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"601\" y=\"-1145.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.183</text>\n",
       "<text text-anchor=\"middle\" x=\"601\" y=\"-1130.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 36</text>\n",
       "<text text-anchor=\"middle\" x=\"601\" y=\"-1114.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 35, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"601\" y=\"-1098.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 16&#45;&gt;17 -->\n",
       "<g id=\"edge17\" class=\"edge\">\n",
       "<title>16&#45;&gt;17</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M808.59,-1240.23C766.75,-1220.93 717.28,-1198.12 677.13,-1179.61\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"678.79,-1176.52 668.24,-1175.51 675.85,-1182.87 678.79,-1176.52\"/>\n",
       "</g>\n",
       "<!-- 26 -->\n",
       "<g id=\"node27\" class=\"node\">\n",
       "<title>26</title>\n",
       "<path fill=\"#4aa5e7\" stroke=\"black\" d=\"M950.75,-1194.75C950.75,-1194.75 843.25,-1194.75 843.25,-1194.75 837.25,-1194.75 831.25,-1188.75 831.25,-1182.75 831.25,-1182.75 831.25,-1104.25 831.25,-1104.25 831.25,-1098.25 837.25,-1092.25 843.25,-1092.25 843.25,-1092.25 950.75,-1092.25 950.75,-1092.25 956.75,-1092.25 962.75,-1098.25 962.75,-1104.25 962.75,-1104.25 962.75,-1182.75 962.75,-1182.75 962.75,-1188.75 956.75,-1194.75 950.75,-1194.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"897\" y=\"-1177.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #26</text>\n",
       "<text text-anchor=\"middle\" x=\"897\" y=\"-1161.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sex &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"897\" y=\"-1145.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.483</text>\n",
       "<text text-anchor=\"middle\" x=\"897\" y=\"-1130.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 62</text>\n",
       "<text text-anchor=\"middle\" x=\"897\" y=\"-1114.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [3, 0, 57, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"897\" y=\"-1098.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 16&#45;&gt;26 -->\n",
       "<g id=\"edge26\" class=\"edge\">\n",
       "<title>16&#45;&gt;26</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M897,-1230.56C897,-1222.71 897,-1214.53 897,-1206.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"900.5,-1206.7 897,-1196.7 893.5,-1206.7 900.5,-1206.7\"/>\n",
       "</g>\n",
       "<!-- 18 -->\n",
       "<g id=\"node19\" class=\"node\">\n",
       "<title>18</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M504.75,-1048.38C504.75,-1048.38 397.25,-1048.38 397.25,-1048.38 391.25,-1048.38 385.25,-1042.38 385.25,-1036.38 385.25,-1036.38 385.25,-973.62 385.25,-973.62 385.25,-967.62 391.25,-961.62 397.25,-961.62 397.25,-961.62 504.75,-961.62 504.75,-961.62 510.75,-961.62 516.75,-967.62 516.75,-973.62 516.75,-973.62 516.75,-1036.38 516.75,-1036.38 516.75,-1042.38 510.75,-1048.38 504.75,-1048.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"451\" y=\"-1031.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #18</text>\n",
       "<text text-anchor=\"middle\" x=\"451\" y=\"-1015.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"451\" y=\"-999.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 25</text>\n",
       "<text text-anchor=\"middle\" x=\"451\" y=\"-983.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 25, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"451\" y=\"-968.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 17&#45;&gt;18 -->\n",
       "<g id=\"edge18\" class=\"edge\">\n",
       "<title>17&#45;&gt;18</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M545.57,-1092.06C532.7,-1080.35 519,-1067.88 506.15,-1056.18\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"508.71,-1053.78 498.95,-1049.64 503.99,-1058.96 508.71,-1053.78\"/>\n",
       "</g>\n",
       "<!-- 19 -->\n",
       "<g id=\"node20\" class=\"node\">\n",
       "<title>19</title>\n",
       "<path fill=\"#4da7e8\" stroke=\"black\" d=\"M654.75,-1056.25C654.75,-1056.25 547.25,-1056.25 547.25,-1056.25 541.25,-1056.25 535.25,-1050.25 535.25,-1044.25 535.25,-1044.25 535.25,-965.75 535.25,-965.75 535.25,-959.75 541.25,-953.75 547.25,-953.75 547.25,-953.75 654.75,-953.75 654.75,-953.75 660.75,-953.75 666.75,-959.75 666.75,-965.75 666.75,-965.75 666.75,-1044.25 666.75,-1044.25 666.75,-1050.25 660.75,-1056.25 654.75,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"601\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #19</text>\n",
       "<text text-anchor=\"middle\" x=\"601\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">paid &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"601\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.439</text>\n",
       "<text text-anchor=\"middle\" x=\"601\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 11</text>\n",
       "<text text-anchor=\"middle\" x=\"601\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 10, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"601\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 17&#45;&gt;19 -->\n",
       "<g id=\"edge19\" class=\"edge\">\n",
       "<title>17&#45;&gt;19</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M601,-1092.06C601,-1084.21 601,-1076.03 601,-1067.96\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"604.5,-1068.2 601,-1058.2 597.5,-1068.2 604.5,-1068.2\"/>\n",
       "</g>\n",
       "<!-- 20 -->\n",
       "<g id=\"node21\" class=\"node\">\n",
       "<title>20</title>\n",
       "<path fill=\"#6ab6ec\" stroke=\"black\" d=\"M439,-917.75C439,-917.75 339,-917.75 339,-917.75 333,-917.75 327,-911.75 327,-905.75 327,-905.75 327,-827.25 327,-827.25 327,-821.25 333,-815.25 339,-815.25 339,-815.25 439,-815.25 439,-815.25 445,-815.25 451,-821.25 451,-827.25 451,-827.25 451,-905.75 451,-905.75 451,-911.75 445,-917.75 439,-917.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"389\" y=\"-900.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #20</text>\n",
       "<text text-anchor=\"middle\" x=\"389\" y=\"-884.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Pedu &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"389\" y=\"-868.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.722</text>\n",
       "<text text-anchor=\"middle\" x=\"389\" y=\"-853.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 5</text>\n",
       "<text text-anchor=\"middle\" x=\"389\" y=\"-837.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 4, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"389\" y=\"-821.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 19&#45;&gt;20 -->\n",
       "<g id=\"edge20\" class=\"edge\">\n",
       "<title>19&#45;&gt;20</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M534.96,-959.28C531.94,-957.39 528.95,-955.54 526,-953.75 500.1,-938.06 490.22,-935.76 461.13,-918.25\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"463.09,-915.34 452.74,-913.09 459.42,-921.31 463.09,-915.34\"/>\n",
       "</g>\n",
       "<!-- 25 -->\n",
       "<g id=\"node26\" class=\"node\">\n",
       "<title>25</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M581,-909.88C581,-909.88 481,-909.88 481,-909.88 475,-909.88 469,-903.88 469,-897.88 469,-897.88 469,-835.12 469,-835.12 469,-829.12 475,-823.12 481,-823.12 481,-823.12 581,-823.12 581,-823.12 587,-823.12 593,-829.12 593,-835.12 593,-835.12 593,-897.88 593,-897.88 593,-903.88 587,-909.88 581,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"531\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #25</text>\n",
       "<text text-anchor=\"middle\" x=\"531\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"531\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 6</text>\n",
       "<text text-anchor=\"middle\" x=\"531\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 6, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"531\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 19&#45;&gt;25 -->\n",
       "<g id=\"edge25\" class=\"edge\">\n",
       "<title>19&#45;&gt;25</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M575.13,-953.56C569.53,-942.63 563.59,-931.04 557.94,-920.03\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"561.22,-918.77 553.55,-911.47 555,-921.96 561.22,-918.77\"/>\n",
       "</g>\n",
       "<!-- 21 -->\n",
       "<g id=\"node22\" class=\"node\">\n",
       "<title>21</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M297,-779.25C297,-779.25 197,-779.25 197,-779.25 191,-779.25 185,-773.25 185,-767.25 185,-767.25 185,-688.75 185,-688.75 185,-682.75 191,-676.75 197,-676.75 197,-676.75 297,-676.75 297,-676.75 303,-676.75 309,-682.75 309,-688.75 309,-688.75 309,-767.25 309,-767.25 309,-773.25 303,-779.25 297,-779.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"247\" y=\"-761.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #21</text>\n",
       "<text text-anchor=\"middle\" x=\"247\" y=\"-746.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">internet &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"247\" y=\"-730.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"247\" y=\"-714.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"247\" y=\"-698.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"247\" y=\"-683.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 20&#45;&gt;21 -->\n",
       "<g id=\"edge21\" class=\"edge\">\n",
       "<title>20&#45;&gt;21</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M336.53,-815.06C327.24,-806.13 317.5,-796.77 308,-787.64\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"310.46,-785.14 300.82,-780.74 305.61,-790.19 310.46,-785.14\"/>\n",
       "</g>\n",
       "<!-- 24 -->\n",
       "<g id=\"node25\" class=\"node\">\n",
       "<title>24</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M439,-771.38C439,-771.38 339,-771.38 339,-771.38 333,-771.38 327,-765.38 327,-759.38 327,-759.38 327,-696.62 327,-696.62 327,-690.62 333,-684.62 339,-684.62 339,-684.62 439,-684.62 439,-684.62 445,-684.62 451,-690.62 451,-696.62 451,-696.62 451,-759.38 451,-759.38 451,-765.38 445,-771.38 439,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"389\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #24</text>\n",
       "<text text-anchor=\"middle\" x=\"389\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"389\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"389\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 3, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"389\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 20&#45;&gt;24 -->\n",
       "<g id=\"edge24\" class=\"edge\">\n",
       "<title>20&#45;&gt;24</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M389,-815.06C389,-804.58 389,-793.49 389,-782.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"392.5,-783.13 389,-773.13 385.5,-783.13 392.5,-783.13\"/>\n",
       "</g>\n",
       "<!-- 22 -->\n",
       "<g id=\"node23\" class=\"node\">\n",
       "<title>22</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M243,-632.88C243,-632.88 143,-632.88 143,-632.88 137,-632.88 131,-626.88 131,-620.88 131,-620.88 131,-558.12 131,-558.12 131,-552.12 137,-546.12 143,-546.12 143,-546.12 243,-546.12 243,-546.12 249,-546.12 255,-552.12 255,-558.12 255,-558.12 255,-620.88 255,-620.88 255,-626.88 249,-632.88 243,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"193\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #22</text>\n",
       "<text text-anchor=\"middle\" x=\"193\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"193\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"193\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"193\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 21&#45;&gt;22 -->\n",
       "<g id=\"edge22\" class=\"edge\">\n",
       "<title>21&#45;&gt;22</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M227.05,-676.56C222.81,-665.85 218.32,-654.51 214.05,-643.71\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"217.35,-642.54 210.42,-634.53 210.84,-645.11 217.35,-642.54\"/>\n",
       "</g>\n",
       "<!-- 23 -->\n",
       "<g id=\"node24\" class=\"node\">\n",
       "<title>23</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M385,-632.88C385,-632.88 285,-632.88 285,-632.88 279,-632.88 273,-626.88 273,-620.88 273,-620.88 273,-558.12 273,-558.12 273,-552.12 279,-546.12 285,-546.12 285,-546.12 385,-546.12 385,-546.12 391,-546.12 397,-552.12 397,-558.12 397,-558.12 397,-620.88 397,-620.88 397,-626.88 391,-632.88 385,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"335\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #23</text>\n",
       "<text text-anchor=\"middle\" x=\"335\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"335\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"335\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"335\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 21&#45;&gt;23 -->\n",
       "<g id=\"edge23\" class=\"edge\">\n",
       "<title>21&#45;&gt;23</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M279.52,-676.56C286.64,-665.52 294.19,-653.81 301.35,-642.7\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"304.23,-644.69 306.7,-634.39 298.34,-640.9 304.23,-644.69\"/>\n",
       "</g>\n",
       "<!-- 27 -->\n",
       "<g id=\"node28\" class=\"node\">\n",
       "<title>27</title>\n",
       "<path fill=\"#4ca6e8\" stroke=\"black\" d=\"M875.75,-1056.25C875.75,-1056.25 768.25,-1056.25 768.25,-1056.25 762.25,-1056.25 756.25,-1050.25 756.25,-1044.25 756.25,-1044.25 756.25,-965.75 756.25,-965.75 756.25,-959.75 762.25,-953.75 768.25,-953.75 768.25,-953.75 875.75,-953.75 875.75,-953.75 881.75,-953.75 887.75,-959.75 887.75,-965.75 887.75,-965.75 887.75,-1044.25 887.75,-1044.25 887.75,-1050.25 881.75,-1056.25 875.75,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"822\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #27</text>\n",
       "<text text-anchor=\"middle\" x=\"822\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">guardian &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"822\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.523</text>\n",
       "<text text-anchor=\"middle\" x=\"822\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 33</text>\n",
       "<text text-anchor=\"middle\" x=\"822\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 30, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"822\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 26&#45;&gt;27 -->\n",
       "<g id=\"edge27\" class=\"edge\">\n",
       "<title>26&#45;&gt;27</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M869.29,-1092.06C864.73,-1083.76 859.96,-1075.09 855.28,-1066.58\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"858.46,-1065.09 850.58,-1058.01 852.33,-1068.46 858.46,-1065.09\"/>\n",
       "</g>\n",
       "<!-- 46 -->\n",
       "<g id=\"node47\" class=\"node\">\n",
       "<title>46</title>\n",
       "<path fill=\"#48a4e7\" stroke=\"black\" d=\"M1025.75,-1056.25C1025.75,-1056.25 918.25,-1056.25 918.25,-1056.25 912.25,-1056.25 906.25,-1050.25 906.25,-1044.25 906.25,-1044.25 906.25,-965.75 906.25,-965.75 906.25,-959.75 912.25,-953.75 918.25,-953.75 918.25,-953.75 1025.75,-953.75 1025.75,-953.75 1031.75,-953.75 1037.75,-959.75 1037.75,-965.75 1037.75,-965.75 1037.75,-1044.25 1037.75,-1044.25 1037.75,-1050.25 1031.75,-1056.25 1025.75,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"972\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #46</text>\n",
       "<text text-anchor=\"middle\" x=\"972\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"972\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.362</text>\n",
       "<text text-anchor=\"middle\" x=\"972\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 29</text>\n",
       "<text text-anchor=\"middle\" x=\"972\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [2, 0, 27, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"972\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 26&#45;&gt;46 -->\n",
       "<g id=\"edge46\" class=\"edge\">\n",
       "<title>26&#45;&gt;46</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M924.71,-1092.06C929.27,-1083.76 934.04,-1075.09 938.72,-1066.58\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"941.67,-1068.46 943.42,-1058.01 935.54,-1065.09 941.67,-1068.46\"/>\n",
       "</g>\n",
       "<!-- 28 -->\n",
       "<g id=\"node29\" class=\"node\">\n",
       "<title>28</title>\n",
       "<path fill=\"#41a1e6\" stroke=\"black\" d=\"M730.75,-917.75C730.75,-917.75 623.25,-917.75 623.25,-917.75 617.25,-917.75 611.25,-911.75 611.25,-905.75 611.25,-905.75 611.25,-827.25 611.25,-827.25 611.25,-821.25 617.25,-815.25 623.25,-815.25 623.25,-815.25 730.75,-815.25 730.75,-815.25 736.75,-815.25 742.75,-821.25 742.75,-827.25 742.75,-827.25 742.75,-905.75 742.75,-905.75 742.75,-911.75 736.75,-917.75 730.75,-917.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"677\" y=\"-900.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #28</text>\n",
       "<text text-anchor=\"middle\" x=\"677\" y=\"-884.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"677\" y=\"-868.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.235</text>\n",
       "<text text-anchor=\"middle\" x=\"677\" y=\"-853.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 26</text>\n",
       "<text text-anchor=\"middle\" x=\"677\" y=\"-837.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 25, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"677\" y=\"-821.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 27&#45;&gt;28 -->\n",
       "<g id=\"edge28\" class=\"edge\">\n",
       "<title>27&#45;&gt;28</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M768.42,-953.56C758.84,-944.54 748.79,-935.08 738.99,-925.86\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"741.63,-923.53 731.95,-919.23 736.83,-928.63 741.63,-923.53\"/>\n",
       "</g>\n",
       "<!-- 37 -->\n",
       "<g id=\"node38\" class=\"node\">\n",
       "<title>37</title>\n",
       "<path fill=\"#7bbeee\" stroke=\"black\" d=\"M873,-917.75C873,-917.75 773,-917.75 773,-917.75 767,-917.75 761,-911.75 761,-905.75 761,-905.75 761,-827.25 761,-827.25 761,-821.25 767,-815.25 773,-815.25 773,-815.25 873,-815.25 873,-815.25 879,-815.25 885,-821.25 885,-827.25 885,-827.25 885,-905.75 885,-905.75 885,-911.75 879,-917.75 873,-917.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-900.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #37</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-884.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-868.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.149</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-853.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 7</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-837.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 5, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-821.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 27&#45;&gt;37 -->\n",
       "<g id=\"edge37\" class=\"edge\">\n",
       "<title>27&#45;&gt;37</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M822.37,-953.56C822.43,-945.71 822.49,-937.53 822.55,-929.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"826.04,-929.73 822.62,-919.7 819.04,-929.68 826.04,-929.73\"/>\n",
       "</g>\n",
       "<!-- 29 -->\n",
       "<g id=\"node30\" class=\"node\">\n",
       "<title>29</title>\n",
       "<path fill=\"#4fa8e8\" stroke=\"black\" d=\"M581,-779.25C581,-779.25 481,-779.25 481,-779.25 475,-779.25 469,-773.25 469,-767.25 469,-767.25 469,-688.75 469,-688.75 469,-682.75 475,-676.75 481,-676.75 481,-676.75 581,-676.75 581,-676.75 587,-676.75 593,-682.75 593,-688.75 593,-688.75 593,-767.25 593,-767.25 593,-773.25 587,-779.25 581,-779.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"531\" y=\"-761.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #29</text>\n",
       "<text text-anchor=\"middle\" x=\"531\" y=\"-746.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">studytime &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"531\" y=\"-730.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.469</text>\n",
       "<text text-anchor=\"middle\" x=\"531\" y=\"-714.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 10</text>\n",
       "<text text-anchor=\"middle\" x=\"531\" y=\"-698.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 9, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"531\" y=\"-683.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 28&#45;&gt;29 -->\n",
       "<g id=\"edge29\" class=\"edge\">\n",
       "<title>28&#45;&gt;29</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M623.05,-815.06C613.4,-806.04 603.28,-796.58 593.42,-787.36\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"596.02,-784.99 586.32,-780.72 591.24,-790.11 596.02,-784.99\"/>\n",
       "</g>\n",
       "<!-- 36 -->\n",
       "<g id=\"node37\" class=\"node\">\n",
       "<title>36</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M730.75,-771.38C730.75,-771.38 623.25,-771.38 623.25,-771.38 617.25,-771.38 611.25,-765.38 611.25,-759.38 611.25,-759.38 611.25,-696.62 611.25,-696.62 611.25,-690.62 617.25,-684.62 623.25,-684.62 623.25,-684.62 730.75,-684.62 730.75,-684.62 736.75,-684.62 742.75,-690.62 742.75,-696.62 742.75,-696.62 742.75,-759.38 742.75,-759.38 742.75,-765.38 736.75,-771.38 730.75,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"677\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #36</text>\n",
       "<text text-anchor=\"middle\" x=\"677\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"677\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 16</text>\n",
       "<text text-anchor=\"middle\" x=\"677\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 16, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"677\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 28&#45;&gt;36 -->\n",
       "<g id=\"edge36\" class=\"edge\">\n",
       "<title>28&#45;&gt;36</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M677,-815.06C677,-804.58 677,-793.49 677,-782.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"680.5,-783.13 677,-773.13 673.5,-783.13 680.5,-783.13\"/>\n",
       "</g>\n",
       "<!-- 30 -->\n",
       "<g id=\"node31\" class=\"node\">\n",
       "<title>30</title>\n",
       "<path fill=\"#6ab6ec\" stroke=\"black\" d=\"M529,-640.75C529,-640.75 429,-640.75 429,-640.75 423,-640.75 417,-634.75 417,-628.75 417,-628.75 417,-550.25 417,-550.25 417,-544.25 423,-538.25 429,-538.25 429,-538.25 529,-538.25 529,-538.25 535,-538.25 541,-544.25 541,-550.25 541,-550.25 541,-628.75 541,-628.75 541,-634.75 535,-640.75 529,-640.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"479\" y=\"-623.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #30</text>\n",
       "<text text-anchor=\"middle\" x=\"479\" y=\"-607.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">address &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"479\" y=\"-591.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.722</text>\n",
       "<text text-anchor=\"middle\" x=\"479\" y=\"-576.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 5</text>\n",
       "<text text-anchor=\"middle\" x=\"479\" y=\"-560.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 4, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"479\" y=\"-544.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 29&#45;&gt;30 -->\n",
       "<g id=\"edge30\" class=\"edge\">\n",
       "<title>29&#45;&gt;30</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M511.78,-676.56C508.73,-668.53 505.53,-660.15 502.39,-651.91\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"505.68,-650.7 498.85,-642.6 499.14,-653.19 505.68,-650.7\"/>\n",
       "</g>\n",
       "<!-- 35 -->\n",
       "<g id=\"node36\" class=\"node\">\n",
       "<title>35</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M671,-632.88C671,-632.88 571,-632.88 571,-632.88 565,-632.88 559,-626.88 559,-620.88 559,-620.88 559,-558.12 559,-558.12 559,-552.12 565,-546.12 571,-546.12 571,-546.12 671,-546.12 671,-546.12 677,-546.12 683,-552.12 683,-558.12 683,-558.12 683,-620.88 683,-620.88 683,-626.88 677,-632.88 671,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"621\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #35</text>\n",
       "<text text-anchor=\"middle\" x=\"621\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"621\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 5</text>\n",
       "<text text-anchor=\"middle\" x=\"621\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 5, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"621\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 29&#45;&gt;35 -->\n",
       "<g id=\"edge35\" class=\"edge\">\n",
       "<title>29&#45;&gt;35</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M564.26,-676.56C571.54,-665.52 579.26,-653.81 586.59,-642.7\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"589.48,-644.66 592.07,-634.38 583.64,-640.8 589.48,-644.66\"/>\n",
       "</g>\n",
       "<!-- 31 -->\n",
       "<g id=\"node32\" class=\"node\">\n",
       "<title>31</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M477,-494.38C477,-494.38 377,-494.38 377,-494.38 371,-494.38 365,-488.38 365,-482.38 365,-482.38 365,-419.62 365,-419.62 365,-413.62 371,-407.62 377,-407.62 377,-407.62 477,-407.62 477,-407.62 483,-407.62 489,-413.62 489,-419.62 489,-419.62 489,-482.38 489,-482.38 489,-488.38 483,-494.38 477,-494.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"427\" y=\"-477.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #31</text>\n",
       "<text text-anchor=\"middle\" x=\"427\" y=\"-461.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"427\" y=\"-445.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"427\" y=\"-429.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"427\" y=\"-414.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 30&#45;&gt;31 -->\n",
       "<g id=\"edge31\" class=\"edge\">\n",
       "<title>30&#45;&gt;31</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M459.78,-538.06C455.71,-527.35 451.39,-516.01 447.27,-505.21\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"450.61,-504.13 443.77,-496.03 444.06,-506.62 450.61,-504.13\"/>\n",
       "</g>\n",
       "<!-- 32 -->\n",
       "<g id=\"node33\" class=\"node\">\n",
       "<title>32</title>\n",
       "<path fill=\"#9ccef2\" stroke=\"black\" d=\"M619,-502.25C619,-502.25 519,-502.25 519,-502.25 513,-502.25 507,-496.25 507,-490.25 507,-490.25 507,-411.75 507,-411.75 507,-405.75 513,-399.75 519,-399.75 519,-399.75 619,-399.75 619,-399.75 625,-399.75 631,-405.75 631,-411.75 631,-411.75 631,-490.25 631,-490.25 631,-496.25 625,-502.25 619,-502.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"569\" y=\"-484.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #32</text>\n",
       "<text text-anchor=\"middle\" x=\"569\" y=\"-469.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">famsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"569\" y=\"-453.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"569\" y=\"-437.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"569\" y=\"-421.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"569\" y=\"-406.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 30&#45;&gt;32 -->\n",
       "<g id=\"edge32\" class=\"edge\">\n",
       "<title>30&#45;&gt;32</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M512.26,-538.06C517.79,-529.67 523.57,-520.9 529.24,-512.3\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"532.16,-514.23 534.75,-503.95 526.32,-510.37 532.16,-514.23\"/>\n",
       "</g>\n",
       "<!-- 33 -->\n",
       "<g id=\"node34\" class=\"node\">\n",
       "<title>33</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M550,-355.88C550,-355.88 450,-355.88 450,-355.88 444,-355.88 438,-349.88 438,-343.88 438,-343.88 438,-281.12 438,-281.12 438,-275.12 444,-269.12 450,-269.12 450,-269.12 550,-269.12 550,-269.12 556,-269.12 562,-275.12 562,-281.12 562,-281.12 562,-343.88 562,-343.88 562,-349.88 556,-355.88 550,-355.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"500\" y=\"-338.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #33</text>\n",
       "<text text-anchor=\"middle\" x=\"500\" y=\"-322.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"500\" y=\"-307.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"500\" y=\"-291.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"500\" y=\"-275.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 32&#45;&gt;33 -->\n",
       "<g id=\"edge33\" class=\"edge\">\n",
       "<title>32&#45;&gt;33</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M543.5,-399.56C538.03,-388.74 532.24,-377.28 526.73,-366.37\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"529.86,-364.82 522.23,-357.47 523.61,-367.97 529.86,-364.82\"/>\n",
       "</g>\n",
       "<!-- 34 -->\n",
       "<g id=\"node35\" class=\"node\">\n",
       "<title>34</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M692,-355.88C692,-355.88 592,-355.88 592,-355.88 586,-355.88 580,-349.88 580,-343.88 580,-343.88 580,-281.12 580,-281.12 580,-275.12 586,-269.12 592,-269.12 592,-269.12 692,-269.12 692,-269.12 698,-269.12 704,-275.12 704,-281.12 704,-281.12 704,-343.88 704,-343.88 704,-349.88 698,-355.88 692,-355.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"642\" y=\"-338.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #34</text>\n",
       "<text text-anchor=\"middle\" x=\"642\" y=\"-322.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"642\" y=\"-307.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"642\" y=\"-291.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"642\" y=\"-275.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 32&#45;&gt;34 -->\n",
       "<g id=\"edge34\" class=\"edge\">\n",
       "<title>32&#45;&gt;34</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M595.98,-399.56C601.82,-388.63 608.02,-377.04 613.91,-366.03\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"616.86,-367.92 618.49,-357.45 610.69,-364.62 616.86,-367.92\"/>\n",
       "</g>\n",
       "<!-- 38 -->\n",
       "<g id=\"node39\" class=\"node\">\n",
       "<title>38</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M873,-771.38C873,-771.38 773,-771.38 773,-771.38 767,-771.38 761,-765.38 761,-759.38 761,-759.38 761,-696.62 761,-696.62 761,-690.62 767,-684.62 773,-684.62 773,-684.62 873,-684.62 873,-684.62 879,-684.62 885,-690.62 885,-696.62 885,-696.62 885,-759.38 885,-759.38 885,-765.38 879,-771.38 873,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #38</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 3, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 37&#45;&gt;38 -->\n",
       "<g id=\"edge38\" class=\"edge\">\n",
       "<title>37&#45;&gt;38</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M823,-815.06C823,-804.58 823,-793.49 823,-782.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"826.5,-783.13 823,-773.13 819.5,-783.13 826.5,-783.13\"/>\n",
       "</g>\n",
       "<!-- 39 -->\n",
       "<g id=\"node40\" class=\"node\">\n",
       "<title>39</title>\n",
       "<path fill=\"#bddef6\" stroke=\"black\" d=\"M1015,-779.25C1015,-779.25 915,-779.25 915,-779.25 909,-779.25 903,-773.25 903,-767.25 903,-767.25 903,-688.75 903,-688.75 903,-682.75 909,-676.75 915,-676.75 915,-676.75 1015,-676.75 1015,-676.75 1021,-676.75 1027,-682.75 1027,-688.75 1027,-688.75 1027,-767.25 1027,-767.25 1027,-773.25 1021,-779.25 1015,-779.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-761.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #39</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-746.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">schoolsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-730.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-714.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 4</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-698.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 2, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-683.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 37&#45;&gt;39 -->\n",
       "<g id=\"edge39\" class=\"edge\">\n",
       "<title>37&#45;&gt;39</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M875.47,-815.06C884.76,-806.13 894.5,-796.77 904,-787.64\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"906.39,-790.19 911.18,-780.74 901.54,-785.14 906.39,-790.19\"/>\n",
       "</g>\n",
       "<!-- 40 -->\n",
       "<g id=\"node41\" class=\"node\">\n",
       "<title>40</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M873,-632.88C873,-632.88 773,-632.88 773,-632.88 767,-632.88 761,-626.88 761,-620.88 761,-620.88 761,-558.12 761,-558.12 761,-552.12 767,-546.12 773,-546.12 773,-546.12 873,-546.12 873,-546.12 879,-546.12 885,-552.12 885,-558.12 885,-558.12 885,-620.88 885,-620.88 885,-626.88 879,-632.88 873,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #40</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 39&#45;&gt;40 -->\n",
       "<g id=\"edge40\" class=\"edge\">\n",
       "<title>39&#45;&gt;40</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M912.53,-676.56C900.46,-664.96 887.62,-652.62 875.55,-641.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"878.06,-638.57 868.43,-634.17 873.21,-643.62 878.06,-638.57\"/>\n",
       "</g>\n",
       "<!-- 41 -->\n",
       "<g id=\"node42\" class=\"node\">\n",
       "<title>41</title>\n",
       "<path fill=\"#9ccef2\" stroke=\"black\" d=\"M1015,-640.75C1015,-640.75 915,-640.75 915,-640.75 909,-640.75 903,-634.75 903,-628.75 903,-628.75 903,-550.25 903,-550.25 903,-544.25 909,-538.25 915,-538.25 915,-538.25 1015,-538.25 1015,-538.25 1021,-538.25 1027,-544.25 1027,-550.25 1027,-550.25 1027,-628.75 1027,-628.75 1027,-634.75 1021,-640.75 1015,-640.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-623.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #41</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-607.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">paid &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-591.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-576.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-560.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-544.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 39&#45;&gt;41 -->\n",
       "<g id=\"edge41\" class=\"edge\">\n",
       "<title>39&#45;&gt;41</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M965,-676.56C965,-668.71 965,-660.53 965,-652.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"968.5,-652.7 965,-642.7 961.5,-652.7 968.5,-652.7\"/>\n",
       "</g>\n",
       "<!-- 42 -->\n",
       "<g id=\"node43\" class=\"node\">\n",
       "<title>42</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M873,-502.25C873,-502.25 773,-502.25 773,-502.25 767,-502.25 761,-496.25 761,-490.25 761,-490.25 761,-411.75 761,-411.75 761,-405.75 767,-399.75 773,-399.75 773,-399.75 873,-399.75 873,-399.75 879,-399.75 885,-405.75 885,-411.75 885,-411.75 885,-490.25 885,-490.25 885,-496.25 879,-502.25 873,-502.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-484.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #42</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-469.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">famsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-453.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-437.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-421.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"823\" y=\"-406.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = bad</text>\n",
       "</g>\n",
       "<!-- 41&#45;&gt;42 -->\n",
       "<g id=\"edge42\" class=\"edge\">\n",
       "<title>41&#45;&gt;42</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M912.53,-538.06C903.24,-529.13 893.5,-519.77 884,-510.64\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"886.46,-508.14 876.82,-503.74 881.61,-513.19 886.46,-508.14\"/>\n",
       "</g>\n",
       "<!-- 45 -->\n",
       "<g id=\"node46\" class=\"node\">\n",
       "<title>45</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M1015,-494.38C1015,-494.38 915,-494.38 915,-494.38 909,-494.38 903,-488.38 903,-482.38 903,-482.38 903,-419.62 903,-419.62 903,-413.62 909,-407.62 915,-407.62 915,-407.62 1015,-407.62 1015,-407.62 1021,-407.62 1027,-413.62 1027,-419.62 1027,-419.62 1027,-482.38 1027,-482.38 1027,-488.38 1021,-494.38 1015,-494.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-477.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #45</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-461.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-445.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-429.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"965\" y=\"-414.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 41&#45;&gt;45 -->\n",
       "<g id=\"edge45\" class=\"edge\">\n",
       "<title>41&#45;&gt;45</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M965,-538.06C965,-527.58 965,-516.49 965,-505.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"968.5,-506.13 965,-496.13 961.5,-506.13 968.5,-506.13\"/>\n",
       "</g>\n",
       "<!-- 43 -->\n",
       "<g id=\"node44\" class=\"node\">\n",
       "<title>43</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M838,-355.88C838,-355.88 738,-355.88 738,-355.88 732,-355.88 726,-349.88 726,-343.88 726,-343.88 726,-281.12 726,-281.12 726,-275.12 732,-269.12 738,-269.12 738,-269.12 838,-269.12 838,-269.12 844,-269.12 850,-275.12 850,-281.12 850,-281.12 850,-343.88 850,-343.88 850,-349.88 844,-355.88 838,-355.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"788\" y=\"-338.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #43</text>\n",
       "<text text-anchor=\"middle\" x=\"788\" y=\"-322.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"788\" y=\"-307.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"788\" y=\"-291.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"788\" y=\"-275.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 42&#45;&gt;43 -->\n",
       "<g id=\"edge43\" class=\"edge\">\n",
       "<title>42&#45;&gt;43</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M810.07,-399.56C807.35,-388.96 804.47,-377.75 801.73,-367.05\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"805.18,-366.4 799.3,-357.59 798.4,-368.14 805.18,-366.4\"/>\n",
       "</g>\n",
       "<!-- 44 -->\n",
       "<g id=\"node45\" class=\"node\">\n",
       "<title>44</title>\n",
       "<path fill=\"#e58139\" stroke=\"black\" d=\"M980,-355.88C980,-355.88 880,-355.88 880,-355.88 874,-355.88 868,-349.88 868,-343.88 868,-343.88 868,-281.12 868,-281.12 868,-275.12 874,-269.12 880,-269.12 880,-269.12 980,-269.12 980,-269.12 986,-269.12 992,-275.12 992,-281.12 992,-281.12 992,-343.88 992,-343.88 992,-349.88 986,-355.88 980,-355.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"930\" y=\"-338.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #44</text>\n",
       "<text text-anchor=\"middle\" x=\"930\" y=\"-322.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"930\" y=\"-307.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"930\" y=\"-291.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"930\" y=\"-275.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = bad</text>\n",
       "</g>\n",
       "<!-- 42&#45;&gt;44 -->\n",
       "<g id=\"edge44\" class=\"edge\">\n",
       "<title>42&#45;&gt;44</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M862.54,-399.56C871.37,-388.29 880.75,-376.33 889.61,-365.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"892.24,-367.34 895.66,-357.31 886.73,-363.02 892.24,-367.34\"/>\n",
       "</g>\n",
       "<!-- 47 -->\n",
       "<g id=\"node48\" class=\"node\">\n",
       "<title>47</title>\n",
       "<path fill=\"#5aade9\" stroke=\"black\" d=\"M1024.75,-917.75C1024.75,-917.75 917.25,-917.75 917.25,-917.75 911.25,-917.75 905.25,-911.75 905.25,-905.75 905.25,-905.75 905.25,-827.25 905.25,-827.25 905.25,-821.25 911.25,-815.25 917.25,-815.25 917.25,-815.25 1024.75,-815.25 1024.75,-815.25 1030.75,-815.25 1036.75,-821.25 1036.75,-827.25 1036.75,-827.25 1036.75,-905.75 1036.75,-905.75 1036.75,-911.75 1030.75,-917.75 1024.75,-917.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"971\" y=\"-900.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #47</text>\n",
       "<text text-anchor=\"middle\" x=\"971\" y=\"-884.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">guardian &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"971\" y=\"-868.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.592</text>\n",
       "<text text-anchor=\"middle\" x=\"971\" y=\"-853.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 14</text>\n",
       "<text text-anchor=\"middle\" x=\"971\" y=\"-837.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [2, 0, 12, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"971\" y=\"-821.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 46&#45;&gt;47 -->\n",
       "<g id=\"edge47\" class=\"edge\">\n",
       "<title>46&#45;&gt;47</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M971.63,-953.56C971.57,-945.71 971.51,-937.53 971.45,-929.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"974.96,-929.68 971.38,-919.7 967.96,-929.73 974.96,-929.68\"/>\n",
       "</g>\n",
       "<!-- 62 -->\n",
       "<g id=\"node63\" class=\"node\">\n",
       "<title>62</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M1174.75,-909.88C1174.75,-909.88 1067.25,-909.88 1067.25,-909.88 1061.25,-909.88 1055.25,-903.88 1055.25,-897.88 1055.25,-897.88 1055.25,-835.12 1055.25,-835.12 1055.25,-829.12 1061.25,-823.12 1067.25,-823.12 1067.25,-823.12 1174.75,-823.12 1174.75,-823.12 1180.75,-823.12 1186.75,-829.12 1186.75,-835.12 1186.75,-835.12 1186.75,-897.88 1186.75,-897.88 1186.75,-903.88 1180.75,-909.88 1174.75,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"1121\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #62</text>\n",
       "<text text-anchor=\"middle\" x=\"1121\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1121\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 15</text>\n",
       "<text text-anchor=\"middle\" x=\"1121\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 15, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1121\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 46&#45;&gt;62 -->\n",
       "<g id=\"edge62\" class=\"edge\">\n",
       "<title>46&#45;&gt;62</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1027.06,-953.56C1039.84,-941.85 1053.45,-929.38 1066.22,-917.68\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1068.35,-920.48 1073.36,-911.14 1063.62,-915.32 1068.35,-920.48\"/>\n",
       "</g>\n",
       "<!-- 48 -->\n",
       "<g id=\"node49\" class=\"node\">\n",
       "<title>48</title>\n",
       "<path fill=\"#6ab6ec\" stroke=\"black\" d=\"M1157,-779.25C1157,-779.25 1057,-779.25 1057,-779.25 1051,-779.25 1045,-773.25 1045,-767.25 1045,-767.25 1045,-688.75 1045,-688.75 1045,-682.75 1051,-676.75 1057,-676.75 1057,-676.75 1157,-676.75 1157,-676.75 1163,-676.75 1169,-682.75 1169,-688.75 1169,-688.75 1169,-767.25 1169,-767.25 1169,-773.25 1163,-779.25 1157,-779.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-761.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #48</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-746.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">studytime &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-730.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.722</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-714.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 10</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-698.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [2, 0, 8, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-683.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 47&#45;&gt;48 -->\n",
       "<g id=\"edge48\" class=\"edge\">\n",
       "<title>47&#45;&gt;48</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1021.25,-815.06C1030.15,-806.13 1039.48,-796.77 1048.58,-787.64\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1050.85,-790.31 1055.43,-780.76 1045.89,-785.37 1050.85,-790.31\"/>\n",
       "</g>\n",
       "<!-- 61 -->\n",
       "<g id=\"node62\" class=\"node\">\n",
       "<title>61</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M1299,-771.38C1299,-771.38 1199,-771.38 1199,-771.38 1193,-771.38 1187,-765.38 1187,-759.38 1187,-759.38 1187,-696.62 1187,-696.62 1187,-690.62 1193,-684.62 1199,-684.62 1199,-684.62 1299,-684.62 1299,-684.62 1305,-684.62 1311,-690.62 1311,-696.62 1311,-696.62 1311,-759.38 1311,-759.38 1311,-765.38 1305,-771.38 1299,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #61</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 4</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 4, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 47&#45;&gt;61 -->\n",
       "<g id=\"edge61\" class=\"edge\">\n",
       "<title>47&#45;&gt;61</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1037,-819.66C1040,-818.1 1043.01,-816.62 1046,-815.25 1101.32,-790 1123.01,-805.21 1178,-779.25 1179.49,-778.54 1180.99,-777.81 1182.48,-777.04\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1183.9,-780.26 1190.98,-772.37 1180.53,-774.12 1183.9,-780.26\"/>\n",
       "</g>\n",
       "<!-- 49 -->\n",
       "<g id=\"node50\" class=\"node\">\n",
       "<title>49</title>\n",
       "<path fill=\"#7bbeee\" stroke=\"black\" d=\"M1157,-640.75C1157,-640.75 1057,-640.75 1057,-640.75 1051,-640.75 1045,-634.75 1045,-628.75 1045,-628.75 1045,-550.25 1045,-550.25 1045,-544.25 1051,-538.25 1057,-538.25 1057,-538.25 1157,-538.25 1157,-538.25 1163,-538.25 1169,-544.25 1169,-550.25 1169,-550.25 1169,-628.75 1169,-628.75 1169,-634.75 1163,-640.75 1157,-640.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-623.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #49</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-607.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">internet &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-591.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.811</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-576.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 8</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-560.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [2, 0, 6, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-544.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 48&#45;&gt;49 -->\n",
       "<g id=\"edge49\" class=\"edge\">\n",
       "<title>48&#45;&gt;49</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1107,-676.56C1107,-668.71 1107,-660.53 1107,-652.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1110.5,-652.7 1107,-642.7 1103.5,-652.7 1110.5,-652.7\"/>\n",
       "</g>\n",
       "<!-- 60 -->\n",
       "<g id=\"node61\" class=\"node\">\n",
       "<title>60</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M1299,-632.88C1299,-632.88 1199,-632.88 1199,-632.88 1193,-632.88 1187,-626.88 1187,-620.88 1187,-620.88 1187,-558.12 1187,-558.12 1187,-552.12 1193,-546.12 1199,-546.12 1199,-546.12 1299,-546.12 1299,-546.12 1305,-546.12 1311,-552.12 1311,-558.12 1311,-558.12 1311,-620.88 1311,-620.88 1311,-626.88 1305,-632.88 1299,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #60</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 48&#45;&gt;60 -->\n",
       "<g id=\"edge60\" class=\"edge\">\n",
       "<title>48&#45;&gt;60</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1159.47,-676.56C1171.54,-664.96 1184.38,-652.62 1196.45,-641.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1198.79,-643.62 1203.57,-634.17 1193.94,-638.57 1198.79,-643.62\"/>\n",
       "</g>\n",
       "<!-- 50 -->\n",
       "<g id=\"node51\" class=\"node\">\n",
       "<title>50</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M1157,-494.38C1157,-494.38 1057,-494.38 1057,-494.38 1051,-494.38 1045,-488.38 1045,-482.38 1045,-482.38 1045,-419.62 1045,-419.62 1045,-413.62 1051,-407.62 1057,-407.62 1057,-407.62 1157,-407.62 1157,-407.62 1163,-407.62 1169,-413.62 1169,-419.62 1169,-419.62 1169,-482.38 1169,-482.38 1169,-488.38 1163,-494.38 1157,-494.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-477.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #50</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-461.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-445.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-429.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-414.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 49&#45;&gt;50 -->\n",
       "<g id=\"edge50\" class=\"edge\">\n",
       "<title>49&#45;&gt;50</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1107,-538.06C1107,-527.58 1107,-516.49 1107,-505.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1110.5,-506.13 1107,-496.13 1103.5,-506.13 1110.5,-506.13\"/>\n",
       "</g>\n",
       "<!-- 51 -->\n",
       "<g id=\"node52\" class=\"node\">\n",
       "<title>51</title>\n",
       "<path fill=\"#88c4ef\" stroke=\"black\" d=\"M1299,-502.25C1299,-502.25 1199,-502.25 1199,-502.25 1193,-502.25 1187,-496.25 1187,-490.25 1187,-490.25 1187,-411.75 1187,-411.75 1187,-405.75 1193,-399.75 1199,-399.75 1199,-399.75 1299,-399.75 1299,-399.75 1305,-399.75 1311,-405.75 1311,-411.75 1311,-411.75 1311,-490.25 1311,-490.25 1311,-496.25 1305,-502.25 1299,-502.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-484.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #51</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-469.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">schoolsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-453.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.863</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-437.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 7</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-421.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [2, 0, 5, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-406.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 49&#45;&gt;51 -->\n",
       "<g id=\"edge51\" class=\"edge\">\n",
       "<title>49&#45;&gt;51</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1159.47,-538.06C1168.76,-529.13 1178.5,-519.77 1188,-510.64\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1190.39,-513.19 1195.18,-503.74 1185.54,-508.14 1190.39,-513.19\"/>\n",
       "</g>\n",
       "<!-- 52 -->\n",
       "<g id=\"node53\" class=\"node\">\n",
       "<title>52</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M1228,-355.88C1228,-355.88 1128,-355.88 1128,-355.88 1122,-355.88 1116,-349.88 1116,-343.88 1116,-343.88 1116,-281.12 1116,-281.12 1116,-275.12 1122,-269.12 1128,-269.12 1128,-269.12 1228,-269.12 1228,-269.12 1234,-269.12 1240,-275.12 1240,-281.12 1240,-281.12 1240,-343.88 1240,-343.88 1240,-349.88 1234,-355.88 1228,-355.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"1178\" y=\"-338.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #52</text>\n",
       "<text text-anchor=\"middle\" x=\"1178\" y=\"-322.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1178\" y=\"-307.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"1178\" y=\"-291.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1178\" y=\"-275.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 51&#45;&gt;52 -->\n",
       "<g id=\"edge52\" class=\"edge\">\n",
       "<title>51&#45;&gt;52</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1222.76,-399.56C1217.08,-388.63 1211.05,-377.04 1205.32,-366.03\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1208.59,-364.72 1200.87,-357.46 1202.38,-367.95 1208.59,-364.72\"/>\n",
       "</g>\n",
       "<!-- 53 -->\n",
       "<g id=\"node54\" class=\"node\">\n",
       "<title>53</title>\n",
       "<path fill=\"#9ccef2\" stroke=\"black\" d=\"M1370,-363.75C1370,-363.75 1270,-363.75 1270,-363.75 1264,-363.75 1258,-357.75 1258,-351.75 1258,-351.75 1258,-273.25 1258,-273.25 1258,-267.25 1264,-261.25 1270,-261.25 1270,-261.25 1370,-261.25 1370,-261.25 1376,-261.25 1382,-267.25 1382,-273.25 1382,-273.25 1382,-351.75 1382,-351.75 1382,-357.75 1376,-363.75 1370,-363.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"1320\" y=\"-346.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #53</text>\n",
       "<text text-anchor=\"middle\" x=\"1320\" y=\"-330.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">famsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1320\" y=\"-314.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"1320\" y=\"-299.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 6</text>\n",
       "<text text-anchor=\"middle\" x=\"1320\" y=\"-283.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [2, 0, 4, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1320\" y=\"-267.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 51&#45;&gt;53 -->\n",
       "<g id=\"edge53\" class=\"edge\">\n",
       "<title>51&#45;&gt;53</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1275.24,-399.56C1279.5,-391.35 1283.97,-382.78 1288.35,-374.35\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1291.43,-376.02 1292.94,-365.53 1285.22,-372.79 1291.43,-376.02\"/>\n",
       "</g>\n",
       "<!-- 54 -->\n",
       "<g id=\"node55\" class=\"node\">\n",
       "<title>54</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M1299,-225.25C1299,-225.25 1199,-225.25 1199,-225.25 1193,-225.25 1187,-219.25 1187,-213.25 1187,-213.25 1187,-134.75 1187,-134.75 1187,-128.75 1193,-122.75 1199,-122.75 1199,-122.75 1299,-122.75 1299,-122.75 1305,-122.75 1311,-128.75 1311,-134.75 1311,-134.75 1311,-213.25 1311,-213.25 1311,-219.25 1305,-225.25 1299,-225.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-207.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #54</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-192.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">paid &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-176.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-160.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-144.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-129.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = bad</text>\n",
       "</g>\n",
       "<!-- 53&#45;&gt;54 -->\n",
       "<g id=\"edge54\" class=\"edge\">\n",
       "<title>53&#45;&gt;54</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1293.76,-261.06C1289.5,-252.85 1285.03,-244.28 1280.65,-235.85\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1283.78,-234.29 1276.06,-227.03 1277.57,-237.52 1283.78,-234.29\"/>\n",
       "</g>\n",
       "<!-- 57 -->\n",
       "<g id=\"node58\" class=\"node\">\n",
       "<title>57</title>\n",
       "<path fill=\"#7bbeee\" stroke=\"black\" d=\"M1441,-225.25C1441,-225.25 1341,-225.25 1341,-225.25 1335,-225.25 1329,-219.25 1329,-213.25 1329,-213.25 1329,-134.75 1329,-134.75 1329,-128.75 1335,-122.75 1341,-122.75 1341,-122.75 1441,-122.75 1441,-122.75 1447,-122.75 1453,-128.75 1453,-134.75 1453,-134.75 1453,-213.25 1453,-213.25 1453,-219.25 1447,-225.25 1441,-225.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"1391\" y=\"-207.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #57</text>\n",
       "<text text-anchor=\"middle\" x=\"1391\" y=\"-192.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">studytime &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1391\" y=\"-176.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.811</text>\n",
       "<text text-anchor=\"middle\" x=\"1391\" y=\"-160.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 4</text>\n",
       "<text text-anchor=\"middle\" x=\"1391\" y=\"-144.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 3, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1391\" y=\"-129.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 53&#45;&gt;57 -->\n",
       "<g id=\"edge57\" class=\"edge\">\n",
       "<title>53&#45;&gt;57</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1346.24,-261.06C1350.5,-252.85 1354.97,-244.28 1359.35,-235.85\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1362.43,-237.52 1363.94,-227.03 1356.22,-234.29 1362.43,-237.52\"/>\n",
       "</g>\n",
       "<!-- 55 -->\n",
       "<g id=\"node56\" class=\"node\">\n",
       "<title>55</title>\n",
       "<path fill=\"#e58139\" stroke=\"black\" d=\"M1157,-86.75C1157,-86.75 1057,-86.75 1057,-86.75 1051,-86.75 1045,-80.75 1045,-74.75 1045,-74.75 1045,-12 1045,-12 1045,-6 1051,0 1057,0 1057,0 1157,0 1157,0 1163,0 1169,-6 1169,-12 1169,-12 1169,-74.75 1169,-74.75 1169,-80.75 1163,-86.75 1157,-86.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-69.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #55</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-53.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-37.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-22.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1107\" y=\"-6.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = bad</text>\n",
       "</g>\n",
       "<!-- 54&#45;&gt;55 -->\n",
       "<g id=\"edge55\" class=\"edge\">\n",
       "<title>54&#45;&gt;55</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1193.29,-122.53C1183.21,-113.41 1172.7,-103.89 1162.63,-94.76\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1165.17,-92.34 1155.41,-88.22 1160.47,-97.53 1165.17,-92.34\"/>\n",
       "</g>\n",
       "<!-- 56 -->\n",
       "<g id=\"node57\" class=\"node\">\n",
       "<title>56</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M1299,-86.75C1299,-86.75 1199,-86.75 1199,-86.75 1193,-86.75 1187,-80.75 1187,-74.75 1187,-74.75 1187,-12 1187,-12 1187,-6 1193,0 1199,0 1199,0 1299,0 1299,0 1305,0 1311,-6 1311,-12 1311,-12 1311,-74.75 1311,-74.75 1311,-80.75 1305,-86.75 1299,-86.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-69.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #56</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-53.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-37.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-22.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1249\" y=\"-6.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 54&#45;&gt;56 -->\n",
       "<g id=\"edge56\" class=\"edge\">\n",
       "<title>54&#45;&gt;56</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1249,-122.53C1249,-114.68 1249,-106.54 1249,-98.62\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1252.5,-98.72 1249,-88.72 1245.5,-98.72 1252.5,-98.72\"/>\n",
       "</g>\n",
       "<!-- 58 -->\n",
       "<g id=\"node59\" class=\"node\">\n",
       "<title>58</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M1441,-86.75C1441,-86.75 1341,-86.75 1341,-86.75 1335,-86.75 1329,-80.75 1329,-74.75 1329,-74.75 1329,-12 1329,-12 1329,-6 1335,0 1341,0 1341,0 1441,0 1441,0 1447,0 1453,-6 1453,-12 1453,-12 1453,-74.75 1453,-74.75 1453,-80.75 1447,-86.75 1441,-86.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"1391\" y=\"-69.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #58</text>\n",
       "<text text-anchor=\"middle\" x=\"1391\" y=\"-53.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1391\" y=\"-37.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"1391\" y=\"-22.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [1, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1391\" y=\"-6.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = bad</text>\n",
       "</g>\n",
       "<!-- 57&#45;&gt;58 -->\n",
       "<g id=\"edge58\" class=\"edge\">\n",
       "<title>57&#45;&gt;58</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1391,-122.53C1391,-114.68 1391,-106.54 1391,-98.62\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1394.5,-98.72 1391,-88.72 1387.5,-98.72 1394.5,-98.72\"/>\n",
       "</g>\n",
       "<!-- 59 -->\n",
       "<g id=\"node60\" class=\"node\">\n",
       "<title>59</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M1583,-86.75C1583,-86.75 1483,-86.75 1483,-86.75 1477,-86.75 1471,-80.75 1471,-74.75 1471,-74.75 1471,-12 1471,-12 1471,-6 1477,0 1483,0 1483,0 1583,0 1583,0 1589,0 1595,-6 1595,-12 1595,-12 1595,-74.75 1595,-74.75 1595,-80.75 1589,-86.75 1583,-86.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"1533\" y=\"-69.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #59</text>\n",
       "<text text-anchor=\"middle\" x=\"1533\" y=\"-53.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1533\" y=\"-37.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"1533\" y=\"-22.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1533\" y=\"-6.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 57&#45;&gt;59 -->\n",
       "<g id=\"edge59\" class=\"edge\">\n",
       "<title>57&#45;&gt;59</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1446.71,-122.53C1456.79,-113.41 1467.3,-103.89 1477.37,-94.76\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1479.53,-97.53 1484.59,-88.22 1474.83,-92.34 1479.53,-97.53\"/>\n",
       "</g>\n",
       "<!-- 64 -->\n",
       "<g id=\"node65\" class=\"node\">\n",
       "<title>64</title>\n",
       "<path fill=\"#49a5e7\" stroke=\"black\" d=\"M1479.75,-1194.75C1479.75,-1194.75 1372.25,-1194.75 1372.25,-1194.75 1366.25,-1194.75 1360.25,-1188.75 1360.25,-1182.75 1360.25,-1182.75 1360.25,-1104.25 1360.25,-1104.25 1360.25,-1098.25 1366.25,-1092.25 1372.25,-1092.25 1372.25,-1092.25 1479.75,-1092.25 1479.75,-1092.25 1485.75,-1092.25 1491.75,-1098.25 1491.75,-1104.25 1491.75,-1104.25 1491.75,-1182.75 1491.75,-1182.75 1491.75,-1188.75 1485.75,-1194.75 1479.75,-1194.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"1426\" y=\"-1177.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #64</text>\n",
       "<text text-anchor=\"middle\" x=\"1426\" y=\"-1161.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">schoolsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1426\" y=\"-1145.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.391</text>\n",
       "<text text-anchor=\"middle\" x=\"1426\" y=\"-1130.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 13</text>\n",
       "<text text-anchor=\"middle\" x=\"1426\" y=\"-1114.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 12, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"1426\" y=\"-1098.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 63&#45;&gt;64 -->\n",
       "<g id=\"edge64\" class=\"edge\">\n",
       "<title>63&#45;&gt;64</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1426,-1230.56C1426,-1222.71 1426,-1214.53 1426,-1206.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1429.5,-1206.7 1426,-1196.7 1422.5,-1206.7 1429.5,-1206.7\"/>\n",
       "</g>\n",
       "<!-- 69 -->\n",
       "<g id=\"node70\" class=\"node\">\n",
       "<title>69</title>\n",
       "<path fill=\"#7bbeee\" stroke=\"black\" d=\"M1691,-1194.75C1691,-1194.75 1591,-1194.75 1591,-1194.75 1585,-1194.75 1579,-1188.75 1579,-1182.75 1579,-1182.75 1579,-1104.25 1579,-1104.25 1579,-1098.25 1585,-1092.25 1591,-1092.25 1591,-1092.25 1691,-1092.25 1691,-1092.25 1697,-1092.25 1703,-1098.25 1703,-1104.25 1703,-1104.25 1703,-1182.75 1703,-1182.75 1703,-1188.75 1697,-1194.75 1691,-1194.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"1641\" y=\"-1177.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #69</text>\n",
       "<text text-anchor=\"middle\" x=\"1641\" y=\"-1161.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 2.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1641\" y=\"-1145.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.149</text>\n",
       "<text text-anchor=\"middle\" x=\"1641\" y=\"-1130.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 7</text>\n",
       "<text text-anchor=\"middle\" x=\"1641\" y=\"-1114.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 5, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"1641\" y=\"-1098.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 63&#45;&gt;69 -->\n",
       "<g id=\"edge69\" class=\"edge\">\n",
       "<title>63&#45;&gt;69</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1491.97,-1239.12C1516.49,-1223.55 1544.41,-1205.82 1569.41,-1189.95\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1570.99,-1193.1 1577.55,-1184.78 1567.24,-1187.19 1570.99,-1193.1\"/>\n",
       "</g>\n",
       "<!-- 65 -->\n",
       "<g id=\"node66\" class=\"node\">\n",
       "<title>65</title>\n",
       "<path fill=\"#6ab6ec\" stroke=\"black\" d=\"M1370,-1056.25C1370,-1056.25 1270,-1056.25 1270,-1056.25 1264,-1056.25 1258,-1050.25 1258,-1044.25 1258,-1044.25 1258,-965.75 1258,-965.75 1258,-959.75 1264,-953.75 1270,-953.75 1270,-953.75 1370,-953.75 1370,-953.75 1376,-953.75 1382,-959.75 1382,-965.75 1382,-965.75 1382,-1044.25 1382,-1044.25 1382,-1050.25 1376,-1056.25 1370,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"1320\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #65</text>\n",
       "<text text-anchor=\"middle\" x=\"1320\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Pedu &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1320\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.722</text>\n",
       "<text text-anchor=\"middle\" x=\"1320\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 5</text>\n",
       "<text text-anchor=\"middle\" x=\"1320\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 4, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"1320\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 64&#45;&gt;65 -->\n",
       "<g id=\"edge65\" class=\"edge\">\n",
       "<title>64&#45;&gt;65</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1386.83,-1092.06C1380.18,-1083.49 1373.21,-1074.52 1366.39,-1065.74\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1369.19,-1063.64 1360.29,-1057.88 1363.66,-1067.93 1369.19,-1063.64\"/>\n",
       "</g>\n",
       "<!-- 68 -->\n",
       "<g id=\"node69\" class=\"node\">\n",
       "<title>68</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M1512,-1048.38C1512,-1048.38 1412,-1048.38 1412,-1048.38 1406,-1048.38 1400,-1042.38 1400,-1036.38 1400,-1036.38 1400,-973.62 1400,-973.62 1400,-967.62 1406,-961.62 1412,-961.62 1412,-961.62 1512,-961.62 1512,-961.62 1518,-961.62 1524,-967.62 1524,-973.62 1524,-973.62 1524,-1036.38 1524,-1036.38 1524,-1042.38 1518,-1048.38 1512,-1048.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"1462\" y=\"-1031.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #68</text>\n",
       "<text text-anchor=\"middle\" x=\"1462\" y=\"-1015.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1462\" y=\"-999.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 8</text>\n",
       "<text text-anchor=\"middle\" x=\"1462\" y=\"-983.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 8, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1462\" y=\"-968.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 64&#45;&gt;68 -->\n",
       "<g id=\"edge68\" class=\"edge\">\n",
       "<title>64&#45;&gt;68</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1439.3,-1092.06C1442.1,-1081.46 1445.05,-1070.25 1447.88,-1059.55\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1451.21,-1060.64 1450.37,-1050.08 1444.44,-1058.86 1451.21,-1060.64\"/>\n",
       "</g>\n",
       "<!-- 66 -->\n",
       "<g id=\"node67\" class=\"node\">\n",
       "<title>66</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M1317,-909.88C1317,-909.88 1217,-909.88 1217,-909.88 1211,-909.88 1205,-903.88 1205,-897.88 1205,-897.88 1205,-835.12 1205,-835.12 1205,-829.12 1211,-823.12 1217,-823.12 1217,-823.12 1317,-823.12 1317,-823.12 1323,-823.12 1329,-829.12 1329,-835.12 1329,-835.12 1329,-897.88 1329,-897.88 1329,-903.88 1323,-909.88 1317,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"1267\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #66</text>\n",
       "<text text-anchor=\"middle\" x=\"1267\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1267\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"1267\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"1267\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 65&#45;&gt;66 -->\n",
       "<g id=\"edge66\" class=\"edge\">\n",
       "<title>65&#45;&gt;66</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1300.42,-953.56C1296.26,-942.85 1291.86,-931.51 1287.66,-920.71\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1290.98,-919.59 1284.1,-911.53 1284.45,-922.12 1290.98,-919.59\"/>\n",
       "</g>\n",
       "<!-- 67 -->\n",
       "<g id=\"node68\" class=\"node\">\n",
       "<title>67</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M1459,-909.88C1459,-909.88 1359,-909.88 1359,-909.88 1353,-909.88 1347,-903.88 1347,-897.88 1347,-897.88 1347,-835.12 1347,-835.12 1347,-829.12 1353,-823.12 1359,-823.12 1359,-823.12 1459,-823.12 1459,-823.12 1465,-823.12 1471,-829.12 1471,-835.12 1471,-835.12 1471,-897.88 1471,-897.88 1471,-903.88 1465,-909.88 1459,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"1409\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #67</text>\n",
       "<text text-anchor=\"middle\" x=\"1409\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1409\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 4</text>\n",
       "<text text-anchor=\"middle\" x=\"1409\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 4, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1409\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 65&#45;&gt;67 -->\n",
       "<g id=\"edge67\" class=\"edge\">\n",
       "<title>65&#45;&gt;67</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1352.89,-953.56C1360.09,-942.52 1367.72,-930.81 1374.97,-919.7\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1377.86,-921.68 1380.38,-911.39 1371.99,-917.85 1377.86,-921.68\"/>\n",
       "</g>\n",
       "<!-- 70 -->\n",
       "<g id=\"node71\" class=\"node\">\n",
       "<title>70</title>\n",
       "<path fill=\"#9ccef2\" stroke=\"black\" d=\"M1691,-1056.25C1691,-1056.25 1591,-1056.25 1591,-1056.25 1585,-1056.25 1579,-1050.25 1579,-1044.25 1579,-1044.25 1579,-965.75 1579,-965.75 1579,-959.75 1585,-953.75 1591,-953.75 1591,-953.75 1691,-953.75 1691,-953.75 1697,-953.75 1703,-959.75 1703,-965.75 1703,-965.75 1703,-1044.25 1703,-1044.25 1703,-1050.25 1697,-1056.25 1691,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"1641\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #70</text>\n",
       "<text text-anchor=\"middle\" x=\"1641\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">schoolsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"1641\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"1641\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"1641\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1641\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 69&#45;&gt;70 -->\n",
       "<g id=\"edge70\" class=\"edge\">\n",
       "<title>69&#45;&gt;70</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1641,-1092.06C1641,-1084.21 1641,-1076.03 1641,-1067.96\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1644.5,-1068.2 1641,-1058.2 1637.5,-1068.2 1644.5,-1068.2\"/>\n",
       "</g>\n",
       "<!-- 73 -->\n",
       "<g id=\"node74\" class=\"node\">\n",
       "<title>73</title>\n",
       "<path fill=\"#7bbeee\" stroke=\"black\" d=\"M1885,-1056.25C1885,-1056.25 1785,-1056.25 1785,-1056.25 1779,-1056.25 1773,-1050.25 1773,-1044.25 1773,-1044.25 1773,-965.75 1773,-965.75 1773,-959.75 1779,-953.75 1785,-953.75 1785,-953.75 1885,-953.75 1885,-953.75 1891,-953.75 1897,-959.75 1897,-965.75 1897,-965.75 1897,-1044.25 1897,-1044.25 1897,-1050.25 1891,-1056.25 1885,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"1835\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #73</text>\n",
       "<text text-anchor=\"middle\" x=\"1835\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Pedu &lt;= 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1835\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.811</text>\n",
       "<text text-anchor=\"middle\" x=\"1835\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 4</text>\n",
       "<text text-anchor=\"middle\" x=\"1835\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 3, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"1835\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 69&#45;&gt;73 -->\n",
       "<g id=\"edge73\" class=\"edge\">\n",
       "<title>69&#45;&gt;73</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1703.45,-1098.56C1722.58,-1085.1 1743.76,-1070.2 1763.44,-1056.35\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1765.26,-1059.35 1771.43,-1050.73 1761.24,-1053.62 1765.26,-1059.35\"/>\n",
       "</g>\n",
       "<!-- 71 -->\n",
       "<g id=\"node72\" class=\"node\">\n",
       "<title>71</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M1601,-909.88C1601,-909.88 1501,-909.88 1501,-909.88 1495,-909.88 1489,-903.88 1489,-897.88 1489,-897.88 1489,-835.12 1489,-835.12 1489,-829.12 1495,-823.12 1501,-823.12 1501,-823.12 1601,-823.12 1601,-823.12 1607,-823.12 1613,-829.12 1613,-835.12 1613,-835.12 1613,-897.88 1613,-897.88 1613,-903.88 1607,-909.88 1601,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"1551\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #71</text>\n",
       "<text text-anchor=\"middle\" x=\"1551\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1551\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"1551\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1551\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 70&#45;&gt;71 -->\n",
       "<g id=\"edge71\" class=\"edge\">\n",
       "<title>70&#45;&gt;71</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1607.74,-953.56C1600.46,-942.52 1592.74,-930.81 1585.41,-919.7\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1588.36,-917.8 1579.93,-911.38 1582.52,-921.66 1588.36,-917.8\"/>\n",
       "</g>\n",
       "<!-- 72 -->\n",
       "<g id=\"node73\" class=\"node\">\n",
       "<title>72</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M1743,-909.88C1743,-909.88 1643,-909.88 1643,-909.88 1637,-909.88 1631,-903.88 1631,-897.88 1631,-897.88 1631,-835.12 1631,-835.12 1631,-829.12 1637,-823.12 1643,-823.12 1643,-823.12 1743,-823.12 1743,-823.12 1749,-823.12 1755,-829.12 1755,-835.12 1755,-835.12 1755,-897.88 1755,-897.88 1755,-903.88 1749,-909.88 1743,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"1693\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #72</text>\n",
       "<text text-anchor=\"middle\" x=\"1693\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1693\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"1693\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1693\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 70&#45;&gt;72 -->\n",
       "<g id=\"edge72\" class=\"edge\">\n",
       "<title>70&#45;&gt;72</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1660.22,-953.56C1664.29,-942.85 1668.61,-931.51 1672.73,-920.71\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1675.94,-922.12 1676.23,-911.53 1669.39,-919.63 1675.94,-922.12\"/>\n",
       "</g>\n",
       "<!-- 74 -->\n",
       "<g id=\"node75\" class=\"node\">\n",
       "<title>74</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M1885,-909.88C1885,-909.88 1785,-909.88 1785,-909.88 1779,-909.88 1773,-903.88 1773,-897.88 1773,-897.88 1773,-835.12 1773,-835.12 1773,-829.12 1779,-823.12 1785,-823.12 1785,-823.12 1885,-823.12 1885,-823.12 1891,-823.12 1897,-829.12 1897,-835.12 1897,-835.12 1897,-897.88 1897,-897.88 1897,-903.88 1891,-909.88 1885,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"1835\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #74</text>\n",
       "<text text-anchor=\"middle\" x=\"1835\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1835\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"1835\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1835\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 73&#45;&gt;74 -->\n",
       "<g id=\"edge74\" class=\"edge\">\n",
       "<title>73&#45;&gt;74</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1835,-953.56C1835,-943.08 1835,-931.99 1835,-921.38\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1838.5,-921.63 1835,-911.63 1831.5,-921.63 1838.5,-921.63\"/>\n",
       "</g>\n",
       "<!-- 75 -->\n",
       "<g id=\"node76\" class=\"node\">\n",
       "<title>75</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M2027,-909.88C2027,-909.88 1927,-909.88 1927,-909.88 1921,-909.88 1915,-903.88 1915,-897.88 1915,-897.88 1915,-835.12 1915,-835.12 1915,-829.12 1921,-823.12 1927,-823.12 1927,-823.12 2027,-823.12 2027,-823.12 2033,-823.12 2039,-829.12 2039,-835.12 2039,-835.12 2039,-897.88 2039,-897.88 2039,-903.88 2033,-909.88 2027,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #75</text>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 73&#45;&gt;75 -->\n",
       "<g id=\"edge75\" class=\"edge\">\n",
       "<title>73&#45;&gt;75</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1887.47,-953.56C1899.54,-941.96 1912.38,-929.62 1924.45,-918.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1926.79,-920.62 1931.57,-911.17 1921.94,-915.57 1926.79,-920.62\"/>\n",
       "</g>\n",
       "<!-- 77 -->\n",
       "<g id=\"node78\" class=\"node\">\n",
       "<title>77</title>\n",
       "<path fill=\"#f1b8f6\" stroke=\"black\" d=\"M2526.75,-1610.25C2526.75,-1610.25 2419.25,-1610.25 2419.25,-1610.25 2413.25,-1610.25 2407.25,-1604.25 2407.25,-1598.25 2407.25,-1598.25 2407.25,-1519.75 2407.25,-1519.75 2407.25,-1513.75 2413.25,-1507.75 2419.25,-1507.75 2419.25,-1507.75 2526.75,-1507.75 2526.75,-1507.75 2532.75,-1507.75 2538.75,-1513.75 2538.75,-1519.75 2538.75,-1519.75 2538.75,-1598.25 2538.75,-1598.25 2538.75,-1604.25 2532.75,-1610.25 2526.75,-1610.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1592.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #77</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1577.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">schoolsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1561.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.463</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1545.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 34</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1529.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 9, 7, 18]</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1514.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 76&#45;&gt;77 -->\n",
       "<g id=\"edge77\" class=\"edge\">\n",
       "<title>76&#45;&gt;77</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2473,-1646.06C2473,-1638.21 2473,-1630.03 2473,-1621.96\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2476.5,-1622.2 2473,-1612.2 2469.5,-1622.2 2476.5,-1622.2\"/>\n",
       "</g>\n",
       "<!-- 122 -->\n",
       "<g id=\"node123\" class=\"node\">\n",
       "<title>122</title>\n",
       "<path fill=\"#e16cec\" stroke=\"black\" d=\"M3204.75,-1610.25C3204.75,-1610.25 3097.25,-1610.25 3097.25,-1610.25 3091.25,-1610.25 3085.25,-1604.25 3085.25,-1598.25 3085.25,-1598.25 3085.25,-1519.75 3085.25,-1519.75 3085.25,-1513.75 3091.25,-1507.75 3097.25,-1507.75 3097.25,-1507.75 3204.75,-1507.75 3204.75,-1507.75 3210.75,-1507.75 3216.75,-1513.75 3216.75,-1519.75 3216.75,-1519.75 3216.75,-1598.25 3216.75,-1598.25 3216.75,-1604.25 3210.75,-1610.25 3204.75,-1610.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"3151\" y=\"-1592.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #122</text>\n",
       "<text text-anchor=\"middle\" x=\"3151\" y=\"-1577.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">higher &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3151\" y=\"-1561.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.957</text>\n",
       "<text text-anchor=\"middle\" x=\"3151\" y=\"-1545.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 55</text>\n",
       "<text text-anchor=\"middle\" x=\"3151\" y=\"-1529.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 4, 8, 43]</text>\n",
       "<text text-anchor=\"middle\" x=\"3151\" y=\"-1514.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 76&#45;&gt;122 -->\n",
       "<g id=\"edge122\" class=\"edge\">\n",
       "<title>76&#45;&gt;122</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2546.53,-1681.7C2675.77,-1655.68 2942.43,-1601.99 3074.05,-1575.49\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3074.62,-1578.95 3083.73,-1573.54 3073.23,-1572.09 3074.62,-1578.95\"/>\n",
       "</g>\n",
       "<!-- 78 -->\n",
       "<g id=\"node79\" class=\"node\">\n",
       "<title>78</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M2450,-1463.88C2450,-1463.88 2350,-1463.88 2350,-1463.88 2344,-1463.88 2338,-1457.88 2338,-1451.88 2338,-1451.88 2338,-1389.12 2338,-1389.12 2338,-1383.12 2344,-1377.12 2350,-1377.12 2350,-1377.12 2450,-1377.12 2450,-1377.12 2456,-1377.12 2462,-1383.12 2462,-1389.12 2462,-1389.12 2462,-1451.88 2462,-1451.88 2462,-1457.88 2456,-1463.88 2450,-1463.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2400\" y=\"-1446.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #78</text>\n",
       "<text text-anchor=\"middle\" x=\"2400\" y=\"-1430.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2400\" y=\"-1415.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"2400\" y=\"-1399.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2400\" y=\"-1383.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 77&#45;&gt;78 -->\n",
       "<g id=\"edge78\" class=\"edge\">\n",
       "<title>77&#45;&gt;78</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2446.02,-1507.56C2440.18,-1496.63 2433.98,-1485.04 2428.09,-1474.03\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2431.31,-1472.62 2423.51,-1465.45 2425.14,-1475.92 2431.31,-1472.62\"/>\n",
       "</g>\n",
       "<!-- 79 -->\n",
       "<g id=\"node80\" class=\"node\">\n",
       "<title>79</title>\n",
       "<path fill=\"#efb2f5\" stroke=\"black\" d=\"M2599.75,-1471.75C2599.75,-1471.75 2492.25,-1471.75 2492.25,-1471.75 2486.25,-1471.75 2480.25,-1465.75 2480.25,-1459.75 2480.25,-1459.75 2480.25,-1381.25 2480.25,-1381.25 2480.25,-1375.25 2486.25,-1369.25 2492.25,-1369.25 2492.25,-1369.25 2599.75,-1369.25 2599.75,-1369.25 2605.75,-1369.25 2611.75,-1375.25 2611.75,-1381.25 2611.75,-1381.25 2611.75,-1459.75 2611.75,-1459.75 2611.75,-1465.75 2605.75,-1471.75 2599.75,-1471.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"2546\" y=\"-1454.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #79</text>\n",
       "<text text-anchor=\"middle\" x=\"2546\" y=\"-1438.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">studytime &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2546\" y=\"-1422.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.4</text>\n",
       "<text text-anchor=\"middle\" x=\"2546\" y=\"-1407.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 32</text>\n",
       "<text text-anchor=\"middle\" x=\"2546\" y=\"-1391.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 9, 5, 18]</text>\n",
       "<text text-anchor=\"middle\" x=\"2546\" y=\"-1375.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 77&#45;&gt;79 -->\n",
       "<g id=\"edge79\" class=\"edge\">\n",
       "<title>77&#45;&gt;79</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2499.98,-1507.56C2504.41,-1499.26 2509.05,-1490.59 2513.6,-1482.08\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2516.55,-1483.99 2518.18,-1473.52 2510.38,-1480.69 2516.55,-1483.99\"/>\n",
       "</g>\n",
       "<!-- 80 -->\n",
       "<g id=\"node81\" class=\"node\">\n",
       "<title>80</title>\n",
       "<path fill=\"#ea97f1\" stroke=\"black\" d=\"M2526.75,-1333.25C2526.75,-1333.25 2419.25,-1333.25 2419.25,-1333.25 2413.25,-1333.25 2407.25,-1327.25 2407.25,-1321.25 2407.25,-1321.25 2407.25,-1242.75 2407.25,-1242.75 2407.25,-1236.75 2413.25,-1230.75 2419.25,-1230.75 2419.25,-1230.75 2526.75,-1230.75 2526.75,-1230.75 2532.75,-1230.75 2538.75,-1236.75 2538.75,-1242.75 2538.75,-1242.75 2538.75,-1321.25 2538.75,-1321.25 2538.75,-1327.25 2532.75,-1333.25 2526.75,-1333.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1315.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #80</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1300.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sex &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1284.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.255</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1268.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 28</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1252.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 7, 3, 18]</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1237.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 79&#45;&gt;80 -->\n",
       "<g id=\"edge80\" class=\"edge\">\n",
       "<title>79&#45;&gt;80</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2519.02,-1369.06C2514.59,-1360.76 2509.95,-1352.09 2505.4,-1343.58\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2508.62,-1342.19 2500.82,-1335.02 2502.45,-1345.49 2508.62,-1342.19\"/>\n",
       "</g>\n",
       "<!-- 119 -->\n",
       "<g id=\"node120\" class=\"node\">\n",
       "<title>119</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M2669,-1333.25C2669,-1333.25 2569,-1333.25 2569,-1333.25 2563,-1333.25 2557,-1327.25 2557,-1321.25 2557,-1321.25 2557,-1242.75 2557,-1242.75 2557,-1236.75 2563,-1230.75 2569,-1230.75 2569,-1230.75 2669,-1230.75 2669,-1230.75 2675,-1230.75 2681,-1236.75 2681,-1242.75 2681,-1242.75 2681,-1321.25 2681,-1321.25 2681,-1327.25 2675,-1333.25 2669,-1333.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"2619\" y=\"-1315.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #119</text>\n",
       "<text text-anchor=\"middle\" x=\"2619\" y=\"-1300.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 2.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2619\" y=\"-1284.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2619\" y=\"-1268.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 4</text>\n",
       "<text text-anchor=\"middle\" x=\"2619\" y=\"-1252.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 2, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2619\" y=\"-1237.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 79&#45;&gt;119 -->\n",
       "<g id=\"edge119\" class=\"edge\">\n",
       "<title>79&#45;&gt;119</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2572.98,-1369.06C2577.41,-1360.76 2582.05,-1352.09 2586.6,-1343.58\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2589.55,-1345.49 2591.18,-1335.02 2583.38,-1342.19 2589.55,-1345.49\"/>\n",
       "</g>\n",
       "<!-- 81 -->\n",
       "<g id=\"node82\" class=\"node\">\n",
       "<title>81</title>\n",
       "<path fill=\"#f2bdf6\" stroke=\"black\" d=\"M2311,-1194.75C2311,-1194.75 2211,-1194.75 2211,-1194.75 2205,-1194.75 2199,-1188.75 2199,-1182.75 2199,-1182.75 2199,-1104.25 2199,-1104.25 2199,-1098.25 2205,-1092.25 2211,-1092.25 2211,-1092.25 2311,-1092.25 2311,-1092.25 2317,-1092.25 2323,-1098.25 2323,-1104.25 2323,-1104.25 2323,-1182.75 2323,-1182.75 2323,-1188.75 2317,-1194.75 2311,-1194.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-1177.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #81</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-1161.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">address &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-1145.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.971</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-1130.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 10</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-1114.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 4, 0, 6]</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-1098.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 80&#45;&gt;81 -->\n",
       "<g id=\"edge81\" class=\"edge\">\n",
       "<title>80&#45;&gt;81</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2406.79,-1238.37C2383.31,-1223.25 2356.77,-1206.16 2332.83,-1190.75\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2335.03,-1188 2324.72,-1185.53 2331.24,-1193.89 2335.03,-1188\"/>\n",
       "</g>\n",
       "<!-- 94 -->\n",
       "<g id=\"node95\" class=\"node\">\n",
       "<title>94</title>\n",
       "<path fill=\"#e788ef\" stroke=\"black\" d=\"M2526.75,-1194.75C2526.75,-1194.75 2419.25,-1194.75 2419.25,-1194.75 2413.25,-1194.75 2407.25,-1188.75 2407.25,-1182.75 2407.25,-1182.75 2407.25,-1104.25 2407.25,-1104.25 2407.25,-1098.25 2413.25,-1092.25 2419.25,-1092.25 2419.25,-1092.25 2526.75,-1092.25 2526.75,-1092.25 2532.75,-1092.25 2538.75,-1098.25 2538.75,-1104.25 2538.75,-1104.25 2538.75,-1182.75 2538.75,-1182.75 2538.75,-1188.75 2532.75,-1194.75 2526.75,-1194.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1177.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #94</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1161.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">higher &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1145.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.252</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1130.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 18</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1114.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 3, 12]</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1098.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 80&#45;&gt;94 -->\n",
       "<g id=\"edge94\" class=\"edge\">\n",
       "<title>80&#45;&gt;94</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2473,-1230.56C2473,-1222.71 2473,-1214.53 2473,-1206.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2476.5,-1206.7 2473,-1196.7 2469.5,-1206.7 2476.5,-1206.7\"/>\n",
       "</g>\n",
       "<!-- 82 -->\n",
       "<g id=\"node83\" class=\"node\">\n",
       "<title>82</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M2169,-1048.38C2169,-1048.38 2069,-1048.38 2069,-1048.38 2063,-1048.38 2057,-1042.38 2057,-1036.38 2057,-1036.38 2057,-973.62 2057,-973.62 2057,-967.62 2063,-961.62 2069,-961.62 2069,-961.62 2169,-961.62 2169,-961.62 2175,-961.62 2181,-967.62 2181,-973.62 2181,-973.62 2181,-1036.38 2181,-1036.38 2181,-1042.38 2175,-1048.38 2169,-1048.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-1031.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #82</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-1015.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-999.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-983.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 3]</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-968.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 81&#45;&gt;82 -->\n",
       "<g id=\"edge82\" class=\"edge\">\n",
       "<title>81&#45;&gt;82</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2208.53,-1092.06C2196.46,-1080.46 2183.62,-1068.12 2171.55,-1056.52\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2174.06,-1054.07 2164.43,-1049.67 2169.21,-1059.12 2174.06,-1054.07\"/>\n",
       "</g>\n",
       "<!-- 83 -->\n",
       "<g id=\"node84\" class=\"node\">\n",
       "<title>83</title>\n",
       "<path fill=\"#d1f8ce\" stroke=\"black\" d=\"M2311,-1056.25C2311,-1056.25 2211,-1056.25 2211,-1056.25 2205,-1056.25 2199,-1050.25 2199,-1044.25 2199,-1044.25 2199,-965.75 2199,-965.75 2199,-959.75 2205,-953.75 2211,-953.75 2211,-953.75 2311,-953.75 2311,-953.75 2317,-953.75 2323,-959.75 2323,-965.75 2323,-965.75 2323,-1044.25 2323,-1044.25 2323,-1050.25 2317,-1056.25 2311,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #83</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">guardian &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.985</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 7</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 4, 0, 3]</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 81&#45;&gt;83 -->\n",
       "<g id=\"edge83\" class=\"edge\">\n",
       "<title>81&#45;&gt;83</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2261,-1092.06C2261,-1084.21 2261,-1076.03 2261,-1067.96\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2264.5,-1068.2 2261,-1058.2 2257.5,-1068.2 2264.5,-1068.2\"/>\n",
       "</g>\n",
       "<!-- 84 -->\n",
       "<g id=\"node85\" class=\"node\">\n",
       "<title>84</title>\n",
       "<path fill=\"#a3f29c\" stroke=\"black\" d=\"M2169,-917.75C2169,-917.75 2069,-917.75 2069,-917.75 2063,-917.75 2057,-911.75 2057,-905.75 2057,-905.75 2057,-827.25 2057,-827.25 2057,-821.25 2063,-815.25 2069,-815.25 2069,-815.25 2169,-815.25 2169,-815.25 2175,-815.25 2181,-821.25 2181,-827.25 2181,-827.25 2181,-905.75 2181,-905.75 2181,-911.75 2175,-917.75 2169,-917.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-900.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #84</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-884.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Pedu &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-868.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-853.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 6</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-837.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 4, 0, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-821.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 83&#45;&gt;84 -->\n",
       "<g id=\"edge84\" class=\"edge\">\n",
       "<title>83&#45;&gt;84</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2208.53,-953.56C2199.24,-944.63 2189.5,-935.27 2180,-926.14\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2182.46,-923.64 2172.82,-919.24 2177.61,-928.69 2182.46,-923.64\"/>\n",
       "</g>\n",
       "<!-- 93 -->\n",
       "<g id=\"node94\" class=\"node\">\n",
       "<title>93</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M2311,-909.88C2311,-909.88 2211,-909.88 2211,-909.88 2205,-909.88 2199,-903.88 2199,-897.88 2199,-897.88 2199,-835.12 2199,-835.12 2199,-829.12 2205,-823.12 2211,-823.12 2211,-823.12 2311,-823.12 2311,-823.12 2317,-823.12 2323,-829.12 2323,-835.12 2323,-835.12 2323,-897.88 2323,-897.88 2323,-903.88 2317,-909.88 2311,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #93</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 83&#45;&gt;93 -->\n",
       "<g id=\"edge93\" class=\"edge\">\n",
       "<title>83&#45;&gt;93</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2261,-953.56C2261,-943.08 2261,-931.99 2261,-921.38\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2264.5,-921.63 2261,-911.63 2257.5,-921.63 2264.5,-921.63\"/>\n",
       "</g>\n",
       "<!-- 85 -->\n",
       "<g id=\"node86\" class=\"node\">\n",
       "<title>85</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M2027,-771.38C2027,-771.38 1927,-771.38 1927,-771.38 1921,-771.38 1915,-765.38 1915,-759.38 1915,-759.38 1915,-696.62 1915,-696.62 1915,-690.62 1921,-684.62 1927,-684.62 1927,-684.62 2027,-684.62 2027,-684.62 2033,-684.62 2039,-690.62 2039,-696.62 2039,-696.62 2039,-759.38 2039,-759.38 2039,-765.38 2033,-771.38 2027,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #85</text>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 2, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 84&#45;&gt;85 -->\n",
       "<g id=\"edge85\" class=\"edge\">\n",
       "<title>84&#45;&gt;85</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2066.53,-815.06C2054.46,-803.46 2041.62,-791.12 2029.55,-779.52\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2032.06,-777.07 2022.43,-772.67 2027.21,-782.12 2032.06,-777.07\"/>\n",
       "</g>\n",
       "<!-- 86 -->\n",
       "<g id=\"node87\" class=\"node\">\n",
       "<title>86</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M2169,-779.25C2169,-779.25 2069,-779.25 2069,-779.25 2063,-779.25 2057,-773.25 2057,-767.25 2057,-767.25 2057,-688.75 2057,-688.75 2057,-682.75 2063,-676.75 2069,-676.75 2069,-676.75 2169,-676.75 2169,-676.75 2175,-676.75 2181,-682.75 2181,-688.75 2181,-688.75 2181,-767.25 2181,-767.25 2181,-773.25 2175,-779.25 2169,-779.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-761.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #86</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-746.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">guardian &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-730.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-714.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 4</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-698.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 2, 0, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-683.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 84&#45;&gt;86 -->\n",
       "<g id=\"edge86\" class=\"edge\">\n",
       "<title>84&#45;&gt;86</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2119,-815.06C2119,-807.21 2119,-799.03 2119,-790.96\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2122.5,-791.2 2119,-781.2 2115.5,-791.2 2122.5,-791.2\"/>\n",
       "</g>\n",
       "<!-- 87 -->\n",
       "<g id=\"node88\" class=\"node\">\n",
       "<title>87</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M2027,-632.88C2027,-632.88 1927,-632.88 1927,-632.88 1921,-632.88 1915,-626.88 1915,-620.88 1915,-620.88 1915,-558.12 1915,-558.12 1915,-552.12 1921,-546.12 1927,-546.12 1927,-546.12 2027,-546.12 2027,-546.12 2033,-546.12 2039,-552.12 2039,-558.12 2039,-558.12 2039,-620.88 2039,-620.88 2039,-626.88 2033,-632.88 2027,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #87</text>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"1977\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 86&#45;&gt;87 -->\n",
       "<g id=\"edge87\" class=\"edge\">\n",
       "<title>86&#45;&gt;87</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2066.53,-676.56C2054.46,-664.96 2041.62,-652.62 2029.55,-641.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2032.06,-638.57 2022.43,-634.17 2027.21,-643.62 2032.06,-638.57\"/>\n",
       "</g>\n",
       "<!-- 88 -->\n",
       "<g id=\"node89\" class=\"node\">\n",
       "<title>88</title>\n",
       "<path fill=\"#a3f29c\" stroke=\"black\" d=\"M2169,-640.75C2169,-640.75 2069,-640.75 2069,-640.75 2063,-640.75 2057,-634.75 2057,-628.75 2057,-628.75 2057,-550.25 2057,-550.25 2057,-544.25 2063,-538.25 2069,-538.25 2069,-538.25 2169,-538.25 2169,-538.25 2175,-538.25 2181,-544.25 2181,-550.25 2181,-550.25 2181,-628.75 2181,-628.75 2181,-634.75 2175,-640.75 2169,-640.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-623.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #88</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-607.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-591.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-576.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-560.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 2, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"2119\" y=\"-544.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 86&#45;&gt;88 -->\n",
       "<g id=\"edge88\" class=\"edge\">\n",
       "<title>86&#45;&gt;88</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2119,-676.56C2119,-668.71 2119,-660.53 2119,-652.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2122.5,-652.7 2119,-642.7 2115.5,-652.7 2122.5,-652.7\"/>\n",
       "</g>\n",
       "<!-- 89 -->\n",
       "<g id=\"node90\" class=\"node\">\n",
       "<title>89</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M2062,-494.38C2062,-494.38 1962,-494.38 1962,-494.38 1956,-494.38 1950,-488.38 1950,-482.38 1950,-482.38 1950,-419.62 1950,-419.62 1950,-413.62 1956,-407.62 1962,-407.62 1962,-407.62 2062,-407.62 2062,-407.62 2068,-407.62 2074,-413.62 2074,-419.62 2074,-419.62 2074,-482.38 2074,-482.38 2074,-488.38 2068,-494.38 2062,-494.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"2012\" y=\"-477.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #89</text>\n",
       "<text text-anchor=\"middle\" x=\"2012\" y=\"-461.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2012\" y=\"-445.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"2012\" y=\"-429.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2012\" y=\"-414.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 88&#45;&gt;89 -->\n",
       "<g id=\"edge89\" class=\"edge\">\n",
       "<title>88&#45;&gt;89</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2079.46,-538.06C2070.63,-526.79 2061.25,-514.83 2052.39,-503.52\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2055.27,-501.52 2046.34,-495.81 2049.76,-505.84 2055.27,-501.52\"/>\n",
       "</g>\n",
       "<!-- 90 -->\n",
       "<g id=\"node91\" class=\"node\">\n",
       "<title>90</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M2204,-502.25C2204,-502.25 2104,-502.25 2104,-502.25 2098,-502.25 2092,-496.25 2092,-490.25 2092,-490.25 2092,-411.75 2092,-411.75 2092,-405.75 2098,-399.75 2104,-399.75 2104,-399.75 2204,-399.75 2204,-399.75 2210,-399.75 2216,-405.75 2216,-411.75 2216,-411.75 2216,-490.25 2216,-490.25 2216,-496.25 2210,-502.25 2204,-502.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"2154\" y=\"-484.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #90</text>\n",
       "<text text-anchor=\"middle\" x=\"2154\" y=\"-469.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">paid &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2154\" y=\"-453.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2154\" y=\"-437.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"2154\" y=\"-421.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"2154\" y=\"-406.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 88&#45;&gt;90 -->\n",
       "<g id=\"edge90\" class=\"edge\">\n",
       "<title>88&#45;&gt;90</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2131.93,-538.06C2133.97,-530.12 2136.09,-521.84 2138.18,-513.69\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2141.53,-514.71 2140.63,-504.15 2134.75,-512.97 2141.53,-514.71\"/>\n",
       "</g>\n",
       "<!-- 91 -->\n",
       "<g id=\"node92\" class=\"node\">\n",
       "<title>91</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M2097,-355.88C2097,-355.88 1997,-355.88 1997,-355.88 1991,-355.88 1985,-349.88 1985,-343.88 1985,-343.88 1985,-281.12 1985,-281.12 1985,-275.12 1991,-269.12 1997,-269.12 1997,-269.12 2097,-269.12 2097,-269.12 2103,-269.12 2109,-275.12 2109,-281.12 2109,-281.12 2109,-343.88 2109,-343.88 2109,-349.88 2103,-355.88 2097,-355.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2047\" y=\"-338.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #91</text>\n",
       "<text text-anchor=\"middle\" x=\"2047\" y=\"-322.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2047\" y=\"-307.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"2047\" y=\"-291.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2047\" y=\"-275.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 90&#45;&gt;91 -->\n",
       "<g id=\"edge91\" class=\"edge\">\n",
       "<title>90&#45;&gt;91</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2114.46,-399.56C2105.63,-388.29 2096.25,-376.33 2087.39,-365.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2090.27,-363.02 2081.34,-357.31 2084.76,-367.34 2090.27,-363.02\"/>\n",
       "</g>\n",
       "<!-- 92 -->\n",
       "<g id=\"node93\" class=\"node\">\n",
       "<title>92</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M2239,-355.88C2239,-355.88 2139,-355.88 2139,-355.88 2133,-355.88 2127,-349.88 2127,-343.88 2127,-343.88 2127,-281.12 2127,-281.12 2127,-275.12 2133,-269.12 2139,-269.12 2139,-269.12 2239,-269.12 2239,-269.12 2245,-269.12 2251,-275.12 2251,-281.12 2251,-281.12 2251,-343.88 2251,-343.88 2251,-349.88 2245,-355.88 2239,-355.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2189\" y=\"-338.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #92</text>\n",
       "<text text-anchor=\"middle\" x=\"2189\" y=\"-322.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2189\" y=\"-307.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"2189\" y=\"-291.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"2189\" y=\"-275.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 90&#45;&gt;92 -->\n",
       "<g id=\"edge92\" class=\"edge\">\n",
       "<title>90&#45;&gt;92</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2166.93,-399.56C2169.65,-388.96 2172.53,-377.75 2175.27,-367.05\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2178.6,-368.14 2177.7,-357.59 2171.82,-366.4 2178.6,-368.14\"/>\n",
       "</g>\n",
       "<!-- 95 -->\n",
       "<g id=\"node96\" class=\"node\">\n",
       "<title>95</title>\n",
       "<path fill=\"#e788ef\" stroke=\"black\" d=\"M2523,-1056.25C2523,-1056.25 2423,-1056.25 2423,-1056.25 2417,-1056.25 2411,-1050.25 2411,-1044.25 2411,-1044.25 2411,-965.75 2411,-965.75 2411,-959.75 2417,-953.75 2423,-953.75 2423,-953.75 2523,-953.75 2523,-953.75 2529,-953.75 2535,-959.75 2535,-965.75 2535,-965.75 2535,-1044.25 2535,-1044.25 2535,-1050.25 2529,-1056.25 2523,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #95</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">school &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.14</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 13</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 3, 9]</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 94&#45;&gt;95 -->\n",
       "<g id=\"edge95\" class=\"edge\">\n",
       "<title>94&#45;&gt;95</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2473,-1092.06C2473,-1084.21 2473,-1076.03 2473,-1067.96\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2476.5,-1068.2 2473,-1058.2 2469.5,-1068.2 2476.5,-1068.2\"/>\n",
       "</g>\n",
       "<!-- 112 -->\n",
       "<g id=\"node113\" class=\"node\">\n",
       "<title>112</title>\n",
       "<path fill=\"#f2bdf6\" stroke=\"black\" d=\"M2879,-1056.25C2879,-1056.25 2779,-1056.25 2779,-1056.25 2773,-1056.25 2767,-1050.25 2767,-1044.25 2767,-1044.25 2767,-965.75 2767,-965.75 2767,-959.75 2773,-953.75 2779,-953.75 2779,-953.75 2879,-953.75 2879,-953.75 2885,-953.75 2891,-959.75 2891,-965.75 2891,-965.75 2891,-1044.25 2891,-1044.25 2891,-1050.25 2885,-1056.25 2879,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #112</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">guardian &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.971</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 5</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 2, 0, 3]</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 94&#45;&gt;112 -->\n",
       "<g id=\"edge112\" class=\"edge\">\n",
       "<title>94&#45;&gt;112</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2539.06,-1096.78C2542.04,-1095.18 2545.03,-1093.66 2548,-1092.25 2615.54,-1060.12 2697.84,-1036.51 2755.87,-1022.2\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2756.41,-1025.67 2765.3,-1019.9 2754.76,-1018.86 2756.41,-1025.67\"/>\n",
       "</g>\n",
       "<!-- 96 -->\n",
       "<g id=\"node97\" class=\"node\">\n",
       "<title>96</title>\n",
       "<path fill=\"#eb9cf2\" stroke=\"black\" d=\"M2453,-917.75C2453,-917.75 2353,-917.75 2353,-917.75 2347,-917.75 2341,-911.75 2341,-905.75 2341,-905.75 2341,-827.25 2341,-827.25 2341,-821.25 2347,-815.25 2353,-815.25 2353,-815.25 2453,-815.25 2453,-815.25 2459,-815.25 2465,-821.25 2465,-827.25 2465,-827.25 2465,-905.75 2465,-905.75 2465,-911.75 2459,-917.75 2453,-917.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-900.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #96</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-884.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Pstatus &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-868.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-853.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 9</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-837.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 3, 6]</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-821.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 95&#45;&gt;96 -->\n",
       "<g id=\"edge96\" class=\"edge\">\n",
       "<title>95&#45;&gt;96</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2447.13,-953.56C2442.92,-945.35 2438.53,-936.78 2434.21,-928.35\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2437.36,-926.84 2429.68,-919.53 2431.13,-930.03 2437.36,-926.84\"/>\n",
       "</g>\n",
       "<!-- 107 -->\n",
       "<g id=\"node108\" class=\"node\">\n",
       "<title>107</title>\n",
       "<path fill=\"#e47bee\" stroke=\"black\" d=\"M2595,-917.75C2595,-917.75 2495,-917.75 2495,-917.75 2489,-917.75 2483,-911.75 2483,-905.75 2483,-905.75 2483,-827.25 2483,-827.25 2483,-821.25 2489,-815.25 2495,-815.25 2495,-815.25 2595,-815.25 2595,-815.25 2601,-815.25 2607,-821.25 2607,-827.25 2607,-827.25 2607,-905.75 2607,-905.75 2607,-911.75 2601,-917.75 2595,-917.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-900.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #107</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-884.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">internet &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-868.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.811</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-853.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 4</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-837.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 3]</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-821.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 95&#45;&gt;107 -->\n",
       "<g id=\"edge107\" class=\"edge\">\n",
       "<title>95&#45;&gt;107</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2499.61,-953.56C2503.93,-945.35 2508.46,-936.78 2512.9,-928.35\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2515.99,-930 2517.56,-919.53 2509.8,-926.74 2515.99,-930\"/>\n",
       "</g>\n",
       "<!-- 97 -->\n",
       "<g id=\"node98\" class=\"node\">\n",
       "<title>97</title>\n",
       "<path fill=\"#e47bee\" stroke=\"black\" d=\"M2311,-779.25C2311,-779.25 2211,-779.25 2211,-779.25 2205,-779.25 2199,-773.25 2199,-767.25 2199,-767.25 2199,-688.75 2199,-688.75 2199,-682.75 2205,-676.75 2211,-676.75 2211,-676.75 2311,-676.75 2311,-676.75 2317,-676.75 2323,-682.75 2323,-688.75 2323,-688.75 2323,-767.25 2323,-767.25 2323,-773.25 2317,-779.25 2311,-779.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-761.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #97</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-746.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-730.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.811</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-714.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 8</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-698.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 6]</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-683.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 96&#45;&gt;97 -->\n",
       "<g id=\"edge97\" class=\"edge\">\n",
       "<title>96&#45;&gt;97</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2350.53,-815.06C2341.24,-806.13 2331.5,-796.77 2322,-787.64\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2324.46,-785.14 2314.82,-780.74 2319.61,-790.19 2324.46,-785.14\"/>\n",
       "</g>\n",
       "<!-- 106 -->\n",
       "<g id=\"node107\" class=\"node\">\n",
       "<title>106</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M2453,-771.38C2453,-771.38 2353,-771.38 2353,-771.38 2347,-771.38 2341,-765.38 2341,-759.38 2341,-759.38 2341,-696.62 2341,-696.62 2341,-690.62 2347,-684.62 2353,-684.62 2353,-684.62 2453,-684.62 2453,-684.62 2459,-684.62 2465,-690.62 2465,-696.62 2465,-696.62 2465,-759.38 2465,-759.38 2465,-765.38 2459,-771.38 2453,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #106</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 96&#45;&gt;106 -->\n",
       "<g id=\"edge106\" class=\"edge\">\n",
       "<title>96&#45;&gt;106</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2403,-815.06C2403,-804.58 2403,-793.49 2403,-782.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2406.5,-783.13 2403,-773.13 2399.5,-783.13 2406.5,-783.13\"/>\n",
       "</g>\n",
       "<!-- 98 -->\n",
       "<g id=\"node99\" class=\"node\">\n",
       "<title>98</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M2311,-632.88C2311,-632.88 2211,-632.88 2211,-632.88 2205,-632.88 2199,-626.88 2199,-620.88 2199,-620.88 2199,-558.12 2199,-558.12 2199,-552.12 2205,-546.12 2211,-546.12 2211,-546.12 2311,-546.12 2311,-546.12 2317,-546.12 2323,-552.12 2323,-558.12 2323,-558.12 2323,-620.88 2323,-620.88 2323,-626.88 2317,-632.88 2311,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #98</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"2261\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 97&#45;&gt;98 -->\n",
       "<g id=\"edge98\" class=\"edge\">\n",
       "<title>97&#45;&gt;98</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2261,-676.56C2261,-666.08 2261,-654.99 2261,-644.38\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2264.5,-644.63 2261,-634.63 2257.5,-644.63 2264.5,-644.63\"/>\n",
       "</g>\n",
       "<!-- 99 -->\n",
       "<g id=\"node100\" class=\"node\">\n",
       "<title>99</title>\n",
       "<path fill=\"#eb9cf2\" stroke=\"black\" d=\"M2453,-640.75C2453,-640.75 2353,-640.75 2353,-640.75 2347,-640.75 2341,-634.75 2341,-628.75 2341,-628.75 2341,-550.25 2341,-550.25 2341,-544.25 2347,-538.25 2353,-538.25 2353,-538.25 2453,-538.25 2453,-538.25 2459,-538.25 2465,-544.25 2465,-550.25 2465,-550.25 2465,-628.75 2465,-628.75 2465,-634.75 2459,-640.75 2453,-640.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-623.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #99</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-607.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 2.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-591.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-576.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 6</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-560.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 4]</text>\n",
       "<text text-anchor=\"middle\" x=\"2403\" y=\"-544.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 97&#45;&gt;99 -->\n",
       "<g id=\"edge99\" class=\"edge\">\n",
       "<title>97&#45;&gt;99</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2313.47,-676.56C2322.76,-667.63 2332.5,-658.27 2342,-649.14\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2344.39,-651.69 2349.18,-642.24 2339.54,-646.64 2344.39,-651.69\"/>\n",
       "</g>\n",
       "<!-- 100 -->\n",
       "<g id=\"node101\" class=\"node\">\n",
       "<title>100</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M2417,-502.25C2417,-502.25 2317,-502.25 2317,-502.25 2311,-502.25 2305,-496.25 2305,-490.25 2305,-490.25 2305,-411.75 2305,-411.75 2305,-405.75 2311,-399.75 2317,-399.75 2317,-399.75 2417,-399.75 2417,-399.75 2423,-399.75 2429,-405.75 2429,-411.75 2429,-411.75 2429,-490.25 2429,-490.25 2429,-496.25 2423,-502.25 2417,-502.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"2367\" y=\"-484.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #100</text>\n",
       "<text text-anchor=\"middle\" x=\"2367\" y=\"-469.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">paid &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2367\" y=\"-453.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2367\" y=\"-437.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 4</text>\n",
       "<text text-anchor=\"middle\" x=\"2367\" y=\"-421.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"2367\" y=\"-406.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 99&#45;&gt;100 -->\n",
       "<g id=\"edge100\" class=\"edge\">\n",
       "<title>99&#45;&gt;100</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2389.7,-538.06C2387.6,-530.12 2385.42,-521.84 2383.27,-513.69\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2386.69,-512.93 2380.75,-504.15 2379.92,-514.71 2386.69,-512.93\"/>\n",
       "</g>\n",
       "<!-- 105 -->\n",
       "<g id=\"node106\" class=\"node\">\n",
       "<title>105</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M2559,-494.38C2559,-494.38 2459,-494.38 2459,-494.38 2453,-494.38 2447,-488.38 2447,-482.38 2447,-482.38 2447,-419.62 2447,-419.62 2447,-413.62 2453,-407.62 2459,-407.62 2459,-407.62 2559,-407.62 2559,-407.62 2565,-407.62 2571,-413.62 2571,-419.62 2571,-419.62 2571,-482.38 2571,-482.38 2571,-488.38 2565,-494.38 2559,-494.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"2509\" y=\"-477.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #105</text>\n",
       "<text text-anchor=\"middle\" x=\"2509\" y=\"-461.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2509\" y=\"-445.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"2509\" y=\"-429.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"2509\" y=\"-414.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 99&#45;&gt;105 -->\n",
       "<g id=\"edge105\" class=\"edge\">\n",
       "<title>99&#45;&gt;105</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2442.17,-538.06C2450.92,-526.79 2460.21,-514.83 2468.99,-503.52\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2471.61,-505.86 2474.98,-495.81 2466.08,-501.57 2471.61,-505.86\"/>\n",
       "</g>\n",
       "<!-- 101 -->\n",
       "<g id=\"node102\" class=\"node\">\n",
       "<title>101</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M2381,-355.88C2381,-355.88 2281,-355.88 2281,-355.88 2275,-355.88 2269,-349.88 2269,-343.88 2269,-343.88 2269,-281.12 2269,-281.12 2269,-275.12 2275,-269.12 2281,-269.12 2281,-269.12 2381,-269.12 2381,-269.12 2387,-269.12 2393,-275.12 2393,-281.12 2393,-281.12 2393,-343.88 2393,-343.88 2393,-349.88 2387,-355.88 2381,-355.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2331\" y=\"-338.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #101</text>\n",
       "<text text-anchor=\"middle\" x=\"2331\" y=\"-322.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2331\" y=\"-307.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"2331\" y=\"-291.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2331\" y=\"-275.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 100&#45;&gt;101 -->\n",
       "<g id=\"edge101\" class=\"edge\">\n",
       "<title>100&#45;&gt;101</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2353.7,-399.56C2350.9,-388.96 2347.95,-377.75 2345.12,-367.05\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2348.56,-366.36 2342.63,-357.58 2341.79,-368.14 2348.56,-366.36\"/>\n",
       "</g>\n",
       "<!-- 102 -->\n",
       "<g id=\"node103\" class=\"node\">\n",
       "<title>102</title>\n",
       "<path fill=\"#eb9cf2\" stroke=\"black\" d=\"M2523,-363.75C2523,-363.75 2423,-363.75 2423,-363.75 2417,-363.75 2411,-357.75 2411,-351.75 2411,-351.75 2411,-273.25 2411,-273.25 2411,-267.25 2417,-261.25 2423,-261.25 2423,-261.25 2523,-261.25 2523,-261.25 2529,-261.25 2535,-267.25 2535,-273.25 2535,-273.25 2535,-351.75 2535,-351.75 2535,-357.75 2529,-363.75 2523,-363.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-346.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #102</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-330.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Pedu &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-314.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-299.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-283.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"2473\" y=\"-267.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 100&#45;&gt;102 -->\n",
       "<g id=\"edge102\" class=\"edge\">\n",
       "<title>100&#45;&gt;102</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2406.17,-399.56C2412.82,-390.99 2419.79,-382.02 2426.61,-373.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2429.34,-375.43 2432.71,-365.38 2423.81,-371.14 2429.34,-375.43\"/>\n",
       "</g>\n",
       "<!-- 103 -->\n",
       "<g id=\"node104\" class=\"node\">\n",
       "<title>103</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M2452,-217.38C2452,-217.38 2352,-217.38 2352,-217.38 2346,-217.38 2340,-211.38 2340,-205.38 2340,-205.38 2340,-142.62 2340,-142.62 2340,-136.62 2346,-130.62 2352,-130.62 2352,-130.62 2452,-130.62 2452,-130.62 2458,-130.62 2464,-136.62 2464,-142.62 2464,-142.62 2464,-205.38 2464,-205.38 2464,-211.38 2458,-217.38 2452,-217.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"2402\" y=\"-200.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #103</text>\n",
       "<text text-anchor=\"middle\" x=\"2402\" y=\"-184.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2402\" y=\"-168.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"2402\" y=\"-152.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"2402\" y=\"-137.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 102&#45;&gt;103 -->\n",
       "<g id=\"edge103\" class=\"edge\">\n",
       "<title>102&#45;&gt;103</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2446.76,-261.06C2441.08,-250.13 2435.05,-238.54 2429.32,-227.53\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2432.59,-226.22 2424.87,-218.96 2426.38,-229.45 2432.59,-226.22\"/>\n",
       "</g>\n",
       "<!-- 104 -->\n",
       "<g id=\"node105\" class=\"node\">\n",
       "<title>104</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M2594,-217.38C2594,-217.38 2494,-217.38 2494,-217.38 2488,-217.38 2482,-211.38 2482,-205.38 2482,-205.38 2482,-142.62 2482,-142.62 2482,-136.62 2488,-130.62 2494,-130.62 2494,-130.62 2594,-130.62 2594,-130.62 2600,-130.62 2606,-136.62 2606,-142.62 2606,-142.62 2606,-205.38 2606,-205.38 2606,-211.38 2600,-217.38 2594,-217.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"2544\" y=\"-200.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #104</text>\n",
       "<text text-anchor=\"middle\" x=\"2544\" y=\"-184.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2544\" y=\"-168.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"2544\" y=\"-152.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2544\" y=\"-137.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 102&#45;&gt;104 -->\n",
       "<g id=\"edge104\" class=\"edge\">\n",
       "<title>102&#45;&gt;104</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2499.24,-261.06C2504.92,-250.13 2510.95,-238.54 2516.68,-227.53\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2519.62,-229.45 2521.13,-218.96 2513.41,-226.22 2519.62,-229.45\"/>\n",
       "</g>\n",
       "<!-- 108 -->\n",
       "<g id=\"node109\" class=\"node\">\n",
       "<title>108</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M2595,-779.25C2595,-779.25 2495,-779.25 2495,-779.25 2489,-779.25 2483,-773.25 2483,-767.25 2483,-767.25 2483,-688.75 2483,-688.75 2483,-682.75 2489,-676.75 2495,-676.75 2495,-676.75 2595,-676.75 2595,-676.75 2601,-676.75 2607,-682.75 2607,-688.75 2607,-688.75 2607,-767.25 2607,-767.25 2607,-773.25 2601,-779.25 2595,-779.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-761.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #108</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-746.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">paid &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-730.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-714.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-698.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-683.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 107&#45;&gt;108 -->\n",
       "<g id=\"edge108\" class=\"edge\">\n",
       "<title>107&#45;&gt;108</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2545,-815.06C2545,-807.21 2545,-799.03 2545,-790.96\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2548.5,-791.2 2545,-781.2 2541.5,-791.2 2548.5,-791.2\"/>\n",
       "</g>\n",
       "<!-- 111 -->\n",
       "<g id=\"node112\" class=\"node\">\n",
       "<title>111</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M2737,-771.38C2737,-771.38 2637,-771.38 2637,-771.38 2631,-771.38 2625,-765.38 2625,-759.38 2625,-759.38 2625,-696.62 2625,-696.62 2625,-690.62 2631,-684.62 2637,-684.62 2637,-684.62 2737,-684.62 2737,-684.62 2743,-684.62 2749,-690.62 2749,-696.62 2749,-696.62 2749,-759.38 2749,-759.38 2749,-765.38 2743,-771.38 2737,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"2687\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #111</text>\n",
       "<text text-anchor=\"middle\" x=\"2687\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2687\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"2687\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"2687\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 107&#45;&gt;111 -->\n",
       "<g id=\"edge111\" class=\"edge\">\n",
       "<title>107&#45;&gt;111</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2597.47,-815.06C2609.54,-803.46 2622.38,-791.12 2634.45,-779.52\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2636.79,-782.12 2641.57,-772.67 2631.94,-777.07 2636.79,-782.12\"/>\n",
       "</g>\n",
       "<!-- 109 -->\n",
       "<g id=\"node110\" class=\"node\">\n",
       "<title>109</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M2595,-632.88C2595,-632.88 2495,-632.88 2495,-632.88 2489,-632.88 2483,-626.88 2483,-620.88 2483,-620.88 2483,-558.12 2483,-558.12 2483,-552.12 2489,-546.12 2495,-546.12 2495,-546.12 2595,-546.12 2595,-546.12 2601,-546.12 2607,-552.12 2607,-558.12 2607,-558.12 2607,-620.88 2607,-620.88 2607,-626.88 2601,-632.88 2595,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #109</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2545\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 108&#45;&gt;109 -->\n",
       "<g id=\"edge109\" class=\"edge\">\n",
       "<title>108&#45;&gt;109</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2545,-676.56C2545,-666.08 2545,-654.99 2545,-644.38\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2548.5,-644.63 2545,-634.63 2541.5,-644.63 2548.5,-644.63\"/>\n",
       "</g>\n",
       "<!-- 110 -->\n",
       "<g id=\"node111\" class=\"node\">\n",
       "<title>110</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M2737,-632.88C2737,-632.88 2637,-632.88 2637,-632.88 2631,-632.88 2625,-626.88 2625,-620.88 2625,-620.88 2625,-558.12 2625,-558.12 2625,-552.12 2631,-546.12 2637,-546.12 2637,-546.12 2737,-546.12 2737,-546.12 2743,-546.12 2749,-552.12 2749,-558.12 2749,-558.12 2749,-620.88 2749,-620.88 2749,-626.88 2743,-632.88 2737,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2687\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #110</text>\n",
       "<text text-anchor=\"middle\" x=\"2687\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2687\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"2687\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"2687\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 108&#45;&gt;110 -->\n",
       "<g id=\"edge110\" class=\"edge\">\n",
       "<title>108&#45;&gt;110</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2597.47,-676.56C2609.54,-664.96 2622.38,-652.62 2634.45,-641.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2636.79,-643.62 2641.57,-634.17 2631.94,-638.57 2636.79,-643.62\"/>\n",
       "</g>\n",
       "<!-- 113 -->\n",
       "<g id=\"node114\" class=\"node\">\n",
       "<title>113</title>\n",
       "<path fill=\"#e47bee\" stroke=\"black\" d=\"M2879,-917.75C2879,-917.75 2779,-917.75 2779,-917.75 2773,-917.75 2767,-911.75 2767,-905.75 2767,-905.75 2767,-827.25 2767,-827.25 2767,-821.25 2773,-815.25 2779,-815.25 2779,-815.25 2879,-815.25 2879,-815.25 2885,-815.25 2891,-821.25 2891,-827.25 2891,-827.25 2891,-905.75 2891,-905.75 2891,-911.75 2885,-917.75 2879,-917.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-900.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #113</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-884.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">address &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-868.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.811</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-853.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 4</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-837.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 3]</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-821.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 112&#45;&gt;113 -->\n",
       "<g id=\"edge113\" class=\"edge\">\n",
       "<title>112&#45;&gt;113</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2829,-953.56C2829,-945.71 2829,-937.53 2829,-929.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2832.5,-929.7 2829,-919.7 2825.5,-929.7 2832.5,-929.7\"/>\n",
       "</g>\n",
       "<!-- 118 -->\n",
       "<g id=\"node119\" class=\"node\">\n",
       "<title>118</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M3021,-909.88C3021,-909.88 2921,-909.88 2921,-909.88 2915,-909.88 2909,-903.88 2909,-897.88 2909,-897.88 2909,-835.12 2909,-835.12 2909,-829.12 2915,-823.12 2921,-823.12 2921,-823.12 3021,-823.12 3021,-823.12 3027,-823.12 3033,-829.12 3033,-835.12 3033,-835.12 3033,-897.88 3033,-897.88 3033,-903.88 3027,-909.88 3021,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #118</text>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 112&#45;&gt;118 -->\n",
       "<g id=\"edge118\" class=\"edge\">\n",
       "<title>112&#45;&gt;118</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2881.47,-953.56C2893.54,-941.96 2906.38,-929.62 2918.45,-918.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2920.79,-920.62 2925.57,-911.17 2915.94,-915.57 2920.79,-920.62\"/>\n",
       "</g>\n",
       "<!-- 114 -->\n",
       "<g id=\"node115\" class=\"node\">\n",
       "<title>114</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M2879,-779.25C2879,-779.25 2779,-779.25 2779,-779.25 2773,-779.25 2767,-773.25 2767,-767.25 2767,-767.25 2767,-688.75 2767,-688.75 2767,-682.75 2773,-676.75 2779,-676.75 2779,-676.75 2879,-676.75 2879,-676.75 2885,-676.75 2891,-682.75 2891,-688.75 2891,-688.75 2891,-767.25 2891,-767.25 2891,-773.25 2885,-779.25 2879,-779.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-761.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #114</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-746.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">internet &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-730.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-714.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-698.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-683.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 113&#45;&gt;114 -->\n",
       "<g id=\"edge114\" class=\"edge\">\n",
       "<title>113&#45;&gt;114</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2829,-815.06C2829,-807.21 2829,-799.03 2829,-790.96\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2832.5,-791.2 2829,-781.2 2825.5,-791.2 2832.5,-791.2\"/>\n",
       "</g>\n",
       "<!-- 117 -->\n",
       "<g id=\"node118\" class=\"node\">\n",
       "<title>117</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M3021,-771.38C3021,-771.38 2921,-771.38 2921,-771.38 2915,-771.38 2909,-765.38 2909,-759.38 2909,-759.38 2909,-696.62 2909,-696.62 2909,-690.62 2915,-684.62 2921,-684.62 2921,-684.62 3021,-684.62 3021,-684.62 3027,-684.62 3033,-690.62 3033,-696.62 3033,-696.62 3033,-759.38 3033,-759.38 3033,-765.38 3027,-771.38 3021,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #117</text>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 113&#45;&gt;117 -->\n",
       "<g id=\"edge117\" class=\"edge\">\n",
       "<title>113&#45;&gt;117</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2881.47,-815.06C2893.54,-803.46 2906.38,-791.12 2918.45,-779.52\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2920.79,-782.12 2925.57,-772.67 2915.94,-777.07 2920.79,-782.12\"/>\n",
       "</g>\n",
       "<!-- 115 -->\n",
       "<g id=\"node116\" class=\"node\">\n",
       "<title>115</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M2879,-632.88C2879,-632.88 2779,-632.88 2779,-632.88 2773,-632.88 2767,-626.88 2767,-620.88 2767,-620.88 2767,-558.12 2767,-558.12 2767,-552.12 2773,-546.12 2779,-546.12 2779,-546.12 2879,-546.12 2879,-546.12 2885,-546.12 2891,-552.12 2891,-558.12 2891,-558.12 2891,-620.88 2891,-620.88 2891,-626.88 2885,-632.88 2879,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #115</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"2829\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 114&#45;&gt;115 -->\n",
       "<g id=\"edge115\" class=\"edge\">\n",
       "<title>114&#45;&gt;115</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2829,-676.56C2829,-666.08 2829,-654.99 2829,-644.38\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2832.5,-644.63 2829,-634.63 2825.5,-644.63 2832.5,-644.63\"/>\n",
       "</g>\n",
       "<!-- 116 -->\n",
       "<g id=\"node117\" class=\"node\">\n",
       "<title>116</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M3021,-632.88C3021,-632.88 2921,-632.88 2921,-632.88 2915,-632.88 2909,-626.88 2909,-620.88 2909,-620.88 2909,-558.12 2909,-558.12 2909,-552.12 2915,-546.12 2921,-546.12 2921,-546.12 3021,-546.12 3021,-546.12 3027,-546.12 3033,-552.12 3033,-558.12 3033,-558.12 3033,-620.88 3033,-620.88 3033,-626.88 3027,-632.88 3021,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #116</text>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2971\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 114&#45;&gt;116 -->\n",
       "<g id=\"edge116\" class=\"edge\">\n",
       "<title>114&#45;&gt;116</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2881.47,-676.56C2893.54,-664.96 2906.38,-652.62 2918.45,-641.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2920.79,-643.62 2925.57,-634.17 2915.94,-638.57 2920.79,-643.62\"/>\n",
       "</g>\n",
       "<!-- 120 -->\n",
       "<g id=\"node121\" class=\"node\">\n",
       "<title>120</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M2669,-1186.88C2669,-1186.88 2569,-1186.88 2569,-1186.88 2563,-1186.88 2557,-1180.88 2557,-1174.88 2557,-1174.88 2557,-1112.12 2557,-1112.12 2557,-1106.12 2563,-1100.12 2569,-1100.12 2569,-1100.12 2669,-1100.12 2669,-1100.12 2675,-1100.12 2681,-1106.12 2681,-1112.12 2681,-1112.12 2681,-1174.88 2681,-1174.88 2681,-1180.88 2675,-1186.88 2669,-1186.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2619\" y=\"-1169.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #120</text>\n",
       "<text text-anchor=\"middle\" x=\"2619\" y=\"-1153.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2619\" y=\"-1138.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"2619\" y=\"-1122.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2619\" y=\"-1106.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 119&#45;&gt;120 -->\n",
       "<g id=\"edge120\" class=\"edge\">\n",
       "<title>119&#45;&gt;120</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2619,-1230.56C2619,-1220.08 2619,-1208.99 2619,-1198.38\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2622.5,-1198.63 2619,-1188.63 2615.5,-1198.63 2622.5,-1198.63\"/>\n",
       "</g>\n",
       "<!-- 121 -->\n",
       "<g id=\"node122\" class=\"node\">\n",
       "<title>121</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M2811,-1186.88C2811,-1186.88 2711,-1186.88 2711,-1186.88 2705,-1186.88 2699,-1180.88 2699,-1174.88 2699,-1174.88 2699,-1112.12 2699,-1112.12 2699,-1106.12 2705,-1100.12 2711,-1100.12 2711,-1100.12 2811,-1100.12 2811,-1100.12 2817,-1100.12 2823,-1106.12 2823,-1112.12 2823,-1112.12 2823,-1174.88 2823,-1174.88 2823,-1180.88 2817,-1186.88 2811,-1186.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2761\" y=\"-1169.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #121</text>\n",
       "<text text-anchor=\"middle\" x=\"2761\" y=\"-1153.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2761\" y=\"-1138.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"2761\" y=\"-1122.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 2, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"2761\" y=\"-1106.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 119&#45;&gt;121 -->\n",
       "<g id=\"edge121\" class=\"edge\">\n",
       "<title>119&#45;&gt;121</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2671.47,-1230.56C2683.54,-1218.96 2696.38,-1206.62 2708.45,-1195.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2710.79,-1197.62 2715.57,-1188.17 2705.94,-1192.57 2710.79,-1197.62\"/>\n",
       "</g>\n",
       "<!-- 123 -->\n",
       "<g id=\"node124\" class=\"node\">\n",
       "<title>123</title>\n",
       "<path fill=\"#e064eb\" stroke=\"black\" d=\"M3204.75,-1471.75C3204.75,-1471.75 3097.25,-1471.75 3097.25,-1471.75 3091.25,-1471.75 3085.25,-1465.75 3085.25,-1459.75 3085.25,-1459.75 3085.25,-1381.25 3085.25,-1381.25 3085.25,-1375.25 3091.25,-1369.25 3097.25,-1369.25 3097.25,-1369.25 3204.75,-1369.25 3204.75,-1369.25 3210.75,-1369.25 3216.75,-1375.25 3216.75,-1381.25 3216.75,-1381.25 3216.75,-1459.75 3216.75,-1459.75 3216.75,-1465.75 3210.75,-1471.75 3204.75,-1471.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"3151\" y=\"-1454.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #123</text>\n",
       "<text text-anchor=\"middle\" x=\"3151\" y=\"-1438.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">studytime &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3151\" y=\"-1422.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.865</text>\n",
       "<text text-anchor=\"middle\" x=\"3151\" y=\"-1407.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 53</text>\n",
       "<text text-anchor=\"middle\" x=\"3151\" y=\"-1391.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 7, 43]</text>\n",
       "<text text-anchor=\"middle\" x=\"3151\" y=\"-1375.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 122&#45;&gt;123 -->\n",
       "<g id=\"edge123\" class=\"edge\">\n",
       "<title>122&#45;&gt;123</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3151,-1507.56C3151,-1499.71 3151,-1491.53 3151,-1483.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3154.5,-1483.7 3151,-1473.7 3147.5,-1483.7 3154.5,-1483.7\"/>\n",
       "</g>\n",
       "<!-- 156 -->\n",
       "<g id=\"node157\" class=\"node\">\n",
       "<title>156</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M3420,-1471.75C3420,-1471.75 3320,-1471.75 3320,-1471.75 3314,-1471.75 3308,-1465.75 3308,-1459.75 3308,-1459.75 3308,-1381.25 3308,-1381.25 3308,-1375.25 3314,-1369.25 3320,-1369.25 3320,-1369.25 3420,-1369.25 3420,-1369.25 3426,-1369.25 3432,-1375.25 3432,-1381.25 3432,-1381.25 3432,-1459.75 3432,-1459.75 3432,-1465.75 3426,-1471.75 3420,-1471.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"3370\" y=\"-1454.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #156</text>\n",
       "<text text-anchor=\"middle\" x=\"3370\" y=\"-1438.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">schoolsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3370\" y=\"-1422.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3370\" y=\"-1407.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"3370\" y=\"-1391.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"3370\" y=\"-1375.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 122&#45;&gt;156 -->\n",
       "<g id=\"edge156\" class=\"edge\">\n",
       "<title>122&#45;&gt;156</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3217,-1516.86C3242.58,-1500.92 3271.93,-1482.62 3298.05,-1466.35\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3299.59,-1469.51 3306.22,-1461.25 3295.88,-1463.57 3299.59,-1469.51\"/>\n",
       "</g>\n",
       "<!-- 124 -->\n",
       "<g id=\"node125\" class=\"node\">\n",
       "<title>124</title>\n",
       "<path fill=\"#eb9cf2\" stroke=\"black\" d=\"M3128,-1333.25C3128,-1333.25 3028,-1333.25 3028,-1333.25 3022,-1333.25 3016,-1327.25 3016,-1321.25 3016,-1321.25 3016,-1242.75 3016,-1242.75 3016,-1236.75 3022,-1230.75 3028,-1230.75 3028,-1230.75 3128,-1230.75 3128,-1230.75 3134,-1230.75 3140,-1236.75 3140,-1242.75 3140,-1242.75 3140,-1321.25 3140,-1321.25 3140,-1327.25 3134,-1333.25 3128,-1333.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"3078\" y=\"-1315.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #124</text>\n",
       "<text text-anchor=\"middle\" x=\"3078\" y=\"-1300.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Pedu &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3078\" y=\"-1284.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"3078\" y=\"-1268.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 12</text>\n",
       "<text text-anchor=\"middle\" x=\"3078\" y=\"-1252.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 4, 8]</text>\n",
       "<text text-anchor=\"middle\" x=\"3078\" y=\"-1237.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 123&#45;&gt;124 -->\n",
       "<g id=\"edge124\" class=\"edge\">\n",
       "<title>123&#45;&gt;124</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3124.02,-1369.06C3119.59,-1360.76 3114.95,-1352.09 3110.4,-1343.58\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3113.62,-1342.19 3105.82,-1335.02 3107.45,-1345.49 3113.62,-1342.19\"/>\n",
       "</g>\n",
       "<!-- 135 -->\n",
       "<g id=\"node136\" class=\"node\">\n",
       "<title>135</title>\n",
       "<path fill=\"#dd58e9\" stroke=\"black\" d=\"M3277.75,-1333.25C3277.75,-1333.25 3170.25,-1333.25 3170.25,-1333.25 3164.25,-1333.25 3158.25,-1327.25 3158.25,-1321.25 3158.25,-1321.25 3158.25,-1242.75 3158.25,-1242.75 3158.25,-1236.75 3164.25,-1230.75 3170.25,-1230.75 3170.25,-1230.75 3277.75,-1230.75 3277.75,-1230.75 3283.75,-1230.75 3289.75,-1236.75 3289.75,-1242.75 3289.75,-1242.75 3289.75,-1321.25 3289.75,-1321.25 3289.75,-1327.25 3283.75,-1333.25 3277.75,-1333.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"3224\" y=\"-1315.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #135</text>\n",
       "<text text-anchor=\"middle\" x=\"3224\" y=\"-1300.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">schoolsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3224\" y=\"-1284.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.747</text>\n",
       "<text text-anchor=\"middle\" x=\"3224\" y=\"-1268.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 41</text>\n",
       "<text text-anchor=\"middle\" x=\"3224\" y=\"-1252.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 3, 35]</text>\n",
       "<text text-anchor=\"middle\" x=\"3224\" y=\"-1237.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 123&#45;&gt;135 -->\n",
       "<g id=\"edge135\" class=\"edge\">\n",
       "<title>123&#45;&gt;135</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3177.98,-1369.06C3182.41,-1360.76 3187.05,-1352.09 3191.6,-1343.58\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3194.55,-1345.49 3196.18,-1335.02 3188.38,-1342.19 3194.55,-1345.49\"/>\n",
       "</g>\n",
       "<!-- 125 -->\n",
       "<g id=\"node126\" class=\"node\">\n",
       "<title>125</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M2986,-1186.88C2986,-1186.88 2886,-1186.88 2886,-1186.88 2880,-1186.88 2874,-1180.88 2874,-1174.88 2874,-1174.88 2874,-1112.12 2874,-1112.12 2874,-1106.12 2880,-1100.12 2886,-1100.12 2886,-1100.12 2986,-1100.12 2986,-1100.12 2992,-1100.12 2998,-1106.12 2998,-1112.12 2998,-1112.12 2998,-1174.88 2998,-1174.88 2998,-1180.88 2992,-1186.88 2986,-1186.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"2936\" y=\"-1169.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #125</text>\n",
       "<text text-anchor=\"middle\" x=\"2936\" y=\"-1153.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"2936\" y=\"-1138.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"2936\" y=\"-1122.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 3]</text>\n",
       "<text text-anchor=\"middle\" x=\"2936\" y=\"-1106.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 124&#45;&gt;125 -->\n",
       "<g id=\"edge125\" class=\"edge\">\n",
       "<title>124&#45;&gt;125</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3025.53,-1230.56C3013.46,-1218.96 3000.62,-1206.62 2988.55,-1195.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2991.06,-1192.57 2981.43,-1188.17 2986.21,-1197.62 2991.06,-1192.57\"/>\n",
       "</g>\n",
       "<!-- 126 -->\n",
       "<g id=\"node127\" class=\"node\">\n",
       "<title>126</title>\n",
       "<path fill=\"#f7d7fa\" stroke=\"black\" d=\"M3128,-1194.75C3128,-1194.75 3028,-1194.75 3028,-1194.75 3022,-1194.75 3016,-1188.75 3016,-1182.75 3016,-1182.75 3016,-1104.25 3016,-1104.25 3016,-1098.25 3022,-1092.25 3028,-1092.25 3028,-1092.25 3128,-1092.25 3128,-1092.25 3134,-1092.25 3140,-1098.25 3140,-1104.25 3140,-1104.25 3140,-1182.75 3140,-1182.75 3140,-1188.75 3134,-1194.75 3128,-1194.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"3078\" y=\"-1177.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #126</text>\n",
       "<text text-anchor=\"middle\" x=\"3078\" y=\"-1161.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">schoolsup &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3078\" y=\"-1145.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.991</text>\n",
       "<text text-anchor=\"middle\" x=\"3078\" y=\"-1130.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 9</text>\n",
       "<text text-anchor=\"middle\" x=\"3078\" y=\"-1114.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 4, 5]</text>\n",
       "<text text-anchor=\"middle\" x=\"3078\" y=\"-1098.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 124&#45;&gt;126 -->\n",
       "<g id=\"edge126\" class=\"edge\">\n",
       "<title>124&#45;&gt;126</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3078,-1230.56C3078,-1222.71 3078,-1214.53 3078,-1206.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3081.5,-1206.7 3078,-1196.7 3074.5,-1206.7 3081.5,-1206.7\"/>\n",
       "</g>\n",
       "<!-- 127 -->\n",
       "<g id=\"node128\" class=\"node\">\n",
       "<title>127</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M3075,-1048.38C3075,-1048.38 2975,-1048.38 2975,-1048.38 2969,-1048.38 2963,-1042.38 2963,-1036.38 2963,-1036.38 2963,-973.62 2963,-973.62 2963,-967.62 2969,-961.62 2975,-961.62 2975,-961.62 3075,-961.62 3075,-961.62 3081,-961.62 3087,-967.62 3087,-973.62 3087,-973.62 3087,-1036.38 3087,-1036.38 3087,-1042.38 3081,-1048.38 3075,-1048.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"3025\" y=\"-1031.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #127</text>\n",
       "<text text-anchor=\"middle\" x=\"3025\" y=\"-1015.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3025\" y=\"-999.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"3025\" y=\"-983.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"3025\" y=\"-968.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 126&#45;&gt;127 -->\n",
       "<g id=\"edge127\" class=\"edge\">\n",
       "<title>126&#45;&gt;127</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3058.42,-1092.06C3054.26,-1081.35 3049.86,-1070.01 3045.66,-1059.21\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3048.98,-1058.09 3042.1,-1050.03 3042.45,-1060.62 3048.98,-1058.09\"/>\n",
       "</g>\n",
       "<!-- 128 -->\n",
       "<g id=\"node129\" class=\"node\">\n",
       "<title>128</title>\n",
       "<path fill=\"#efb0f5\" stroke=\"black\" d=\"M3217,-1056.25C3217,-1056.25 3117,-1056.25 3117,-1056.25 3111,-1056.25 3105,-1050.25 3105,-1044.25 3105,-1044.25 3105,-965.75 3105,-965.75 3105,-959.75 3111,-953.75 3117,-953.75 3117,-953.75 3217,-953.75 3217,-953.75 3223,-953.75 3229,-959.75 3229,-965.75 3229,-965.75 3229,-1044.25 3229,-1044.25 3229,-1050.25 3223,-1056.25 3217,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"3167\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #128</text>\n",
       "<text text-anchor=\"middle\" x=\"3167\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3167\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.954</text>\n",
       "<text text-anchor=\"middle\" x=\"3167\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 8</text>\n",
       "<text text-anchor=\"middle\" x=\"3167\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 3, 5]</text>\n",
       "<text text-anchor=\"middle\" x=\"3167\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 126&#45;&gt;128 -->\n",
       "<g id=\"edge128\" class=\"edge\">\n",
       "<title>126&#45;&gt;128</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3110.89,-1092.06C3116.36,-1083.67 3122.08,-1074.9 3127.68,-1066.3\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3130.59,-1068.24 3133.12,-1057.96 3124.73,-1064.42 3130.59,-1068.24\"/>\n",
       "</g>\n",
       "<!-- 129 -->\n",
       "<g id=\"node130\" class=\"node\">\n",
       "<title>129</title>\n",
       "<path fill=\"#bddef6\" stroke=\"black\" d=\"M3190,-917.75C3190,-917.75 3090,-917.75 3090,-917.75 3084,-917.75 3078,-911.75 3078,-905.75 3078,-905.75 3078,-827.25 3078,-827.25 3078,-821.25 3084,-815.25 3090,-815.25 3090,-815.25 3190,-815.25 3190,-815.25 3196,-815.25 3202,-821.25 3202,-827.25 3202,-827.25 3202,-905.75 3202,-905.75 3202,-911.75 3196,-917.75 3190,-917.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"3140\" y=\"-900.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #129</text>\n",
       "<text text-anchor=\"middle\" x=\"3140\" y=\"-884.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sex &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3140\" y=\"-868.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.971</text>\n",
       "<text text-anchor=\"middle\" x=\"3140\" y=\"-853.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 5</text>\n",
       "<text text-anchor=\"middle\" x=\"3140\" y=\"-837.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 3, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"3140\" y=\"-821.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 128&#45;&gt;129 -->\n",
       "<g id=\"edge129\" class=\"edge\">\n",
       "<title>128&#45;&gt;129</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3157.02,-953.56C3155.47,-945.71 3153.85,-937.53 3152.26,-929.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3155.69,-928.8 3150.32,-919.67 3148.83,-930.16 3155.69,-928.8\"/>\n",
       "</g>\n",
       "<!-- 134 -->\n",
       "<g id=\"node135\" class=\"node\">\n",
       "<title>134</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M3332,-909.88C3332,-909.88 3232,-909.88 3232,-909.88 3226,-909.88 3220,-903.88 3220,-897.88 3220,-897.88 3220,-835.12 3220,-835.12 3220,-829.12 3226,-823.12 3232,-823.12 3232,-823.12 3332,-823.12 3332,-823.12 3338,-823.12 3344,-829.12 3344,-835.12 3344,-835.12 3344,-897.88 3344,-897.88 3344,-903.88 3338,-909.88 3332,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"3282\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #134</text>\n",
       "<text text-anchor=\"middle\" x=\"3282\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3282\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"3282\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 3]</text>\n",
       "<text text-anchor=\"middle\" x=\"3282\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 128&#45;&gt;134 -->\n",
       "<g id=\"edge134\" class=\"edge\">\n",
       "<title>128&#45;&gt;134</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3209.5,-953.56C3219.08,-942.18 3229.26,-930.1 3238.88,-918.69\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3241.35,-921.18 3245.12,-911.28 3236,-916.67 3241.35,-921.18\"/>\n",
       "</g>\n",
       "<!-- 130 -->\n",
       "<g id=\"node131\" class=\"node\">\n",
       "<title>130</title>\n",
       "<path fill=\"#eb9cf2\" stroke=\"black\" d=\"M3163,-779.25C3163,-779.25 3063,-779.25 3063,-779.25 3057,-779.25 3051,-773.25 3051,-767.25 3051,-767.25 3051,-688.75 3051,-688.75 3051,-682.75 3057,-676.75 3063,-676.75 3063,-676.75 3163,-676.75 3163,-676.75 3169,-676.75 3175,-682.75 3175,-688.75 3175,-688.75 3175,-767.25 3175,-767.25 3175,-773.25 3169,-779.25 3163,-779.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"3113\" y=\"-761.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #130</text>\n",
       "<text text-anchor=\"middle\" x=\"3113\" y=\"-746.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Pedu &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3113\" y=\"-730.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"3113\" y=\"-714.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"3113\" y=\"-698.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"3113\" y=\"-683.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 129&#45;&gt;130 -->\n",
       "<g id=\"edge130\" class=\"edge\">\n",
       "<title>129&#45;&gt;130</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3130.02,-815.06C3128.47,-807.21 3126.85,-799.03 3125.26,-790.96\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3128.69,-790.3 3123.32,-781.17 3121.83,-791.66 3128.69,-790.3\"/>\n",
       "</g>\n",
       "<!-- 133 -->\n",
       "<g id=\"node134\" class=\"node\">\n",
       "<title>133</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M3305,-771.38C3305,-771.38 3205,-771.38 3205,-771.38 3199,-771.38 3193,-765.38 3193,-759.38 3193,-759.38 3193,-696.62 3193,-696.62 3193,-690.62 3199,-684.62 3205,-684.62 3205,-684.62 3305,-684.62 3305,-684.62 3311,-684.62 3317,-690.62 3317,-696.62 3317,-696.62 3317,-759.38 3317,-759.38 3317,-765.38 3311,-771.38 3305,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"3255\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #133</text>\n",
       "<text text-anchor=\"middle\" x=\"3255\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3255\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"3255\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"3255\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 129&#45;&gt;133 -->\n",
       "<g id=\"edge133\" class=\"edge\">\n",
       "<title>129&#45;&gt;133</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3182.5,-815.06C3192.08,-803.68 3202.26,-791.6 3211.88,-780.19\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3214.35,-782.68 3218.12,-772.78 3209,-778.17 3214.35,-782.68\"/>\n",
       "</g>\n",
       "<!-- 131 -->\n",
       "<g id=\"node132\" class=\"node\">\n",
       "<title>131</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M3163,-632.88C3163,-632.88 3063,-632.88 3063,-632.88 3057,-632.88 3051,-626.88 3051,-620.88 3051,-620.88 3051,-558.12 3051,-558.12 3051,-552.12 3057,-546.12 3063,-546.12 3063,-546.12 3163,-546.12 3163,-546.12 3169,-546.12 3175,-552.12 3175,-558.12 3175,-558.12 3175,-620.88 3175,-620.88 3175,-626.88 3169,-632.88 3163,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"3113\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #131</text>\n",
       "<text text-anchor=\"middle\" x=\"3113\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3113\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"3113\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"3113\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 130&#45;&gt;131 -->\n",
       "<g id=\"edge131\" class=\"edge\">\n",
       "<title>130&#45;&gt;131</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3113,-676.56C3113,-666.08 3113,-654.99 3113,-644.38\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3116.5,-644.63 3113,-634.63 3109.5,-644.63 3116.5,-644.63\"/>\n",
       "</g>\n",
       "<!-- 132 -->\n",
       "<g id=\"node133\" class=\"node\">\n",
       "<title>132</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M3305,-632.88C3305,-632.88 3205,-632.88 3205,-632.88 3199,-632.88 3193,-626.88 3193,-620.88 3193,-620.88 3193,-558.12 3193,-558.12 3193,-552.12 3199,-546.12 3205,-546.12 3205,-546.12 3305,-546.12 3305,-546.12 3311,-546.12 3317,-552.12 3317,-558.12 3317,-558.12 3317,-620.88 3317,-620.88 3317,-626.88 3311,-632.88 3305,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"3255\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #132</text>\n",
       "<text text-anchor=\"middle\" x=\"3255\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3255\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"3255\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 2]</text>\n",
       "<text text-anchor=\"middle\" x=\"3255\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 130&#45;&gt;132 -->\n",
       "<g id=\"edge132\" class=\"edge\">\n",
       "<title>130&#45;&gt;132</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3165.47,-676.56C3177.54,-664.96 3190.38,-652.62 3202.45,-641.02\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3204.79,-643.62 3209.57,-634.17 3199.94,-638.57 3204.79,-643.62\"/>\n",
       "</g>\n",
       "<!-- 136 -->\n",
       "<g id=\"node137\" class=\"node\">\n",
       "<title>136</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M3277.75,-1186.88C3277.75,-1186.88 3170.25,-1186.88 3170.25,-1186.88 3164.25,-1186.88 3158.25,-1180.88 3158.25,-1174.88 3158.25,-1174.88 3158.25,-1112.12 3158.25,-1112.12 3158.25,-1106.12 3164.25,-1100.12 3170.25,-1100.12 3170.25,-1100.12 3277.75,-1100.12 3277.75,-1100.12 3283.75,-1100.12 3289.75,-1106.12 3289.75,-1112.12 3289.75,-1112.12 3289.75,-1174.88 3289.75,-1174.88 3289.75,-1180.88 3283.75,-1186.88 3277.75,-1186.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"3224\" y=\"-1169.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #136</text>\n",
       "<text text-anchor=\"middle\" x=\"3224\" y=\"-1153.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3224\" y=\"-1138.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 13</text>\n",
       "<text text-anchor=\"middle\" x=\"3224\" y=\"-1122.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 13]</text>\n",
       "<text text-anchor=\"middle\" x=\"3224\" y=\"-1106.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 135&#45;&gt;136 -->\n",
       "<g id=\"edge136\" class=\"edge\">\n",
       "<title>135&#45;&gt;136</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3224,-1230.56C3224,-1220.08 3224,-1208.99 3224,-1198.38\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3227.5,-1198.63 3224,-1188.63 3220.5,-1198.63 3227.5,-1198.63\"/>\n",
       "</g>\n",
       "<!-- 137 -->\n",
       "<g id=\"node138\" class=\"node\">\n",
       "<title>137</title>\n",
       "<path fill=\"#e169eb\" stroke=\"black\" d=\"M3663.75,-1194.75C3663.75,-1194.75 3556.25,-1194.75 3556.25,-1194.75 3550.25,-1194.75 3544.25,-1188.75 3544.25,-1182.75 3544.25,-1182.75 3544.25,-1104.25 3544.25,-1104.25 3544.25,-1098.25 3550.25,-1092.25 3556.25,-1092.25 3556.25,-1092.25 3663.75,-1092.25 3663.75,-1092.25 3669.75,-1092.25 3675.75,-1098.25 3675.75,-1104.25 3675.75,-1104.25 3675.75,-1182.75 3675.75,-1182.75 3675.75,-1188.75 3669.75,-1194.75 3663.75,-1194.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"3610\" y=\"-1177.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #137</text>\n",
       "<text text-anchor=\"middle\" x=\"3610\" y=\"-1161.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 2.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3610\" y=\"-1145.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.964</text>\n",
       "<text text-anchor=\"middle\" x=\"3610\" y=\"-1130.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 28</text>\n",
       "<text text-anchor=\"middle\" x=\"3610\" y=\"-1114.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 3, 22]</text>\n",
       "<text text-anchor=\"middle\" x=\"3610\" y=\"-1098.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 135&#45;&gt;137 -->\n",
       "<g id=\"edge137\" class=\"edge\">\n",
       "<title>135&#45;&gt;137</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3290.01,-1235.18C3293,-1233.61 3296.01,-1232.12 3299,-1230.75 3375.17,-1195.78 3468.52,-1172.22 3532.96,-1158.69\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3533.28,-1162.2 3542.36,-1156.75 3531.86,-1155.34 3533.28,-1162.2\"/>\n",
       "</g>\n",
       "<!-- 138 -->\n",
       "<g id=\"node139\" class=\"node\">\n",
       "<title>138</title>\n",
       "<path fill=\"#e47bee\" stroke=\"black\" d=\"M3663.38,-1056.25C3663.38,-1056.25 3556.62,-1056.25 3556.62,-1056.25 3550.62,-1056.25 3544.62,-1050.25 3544.62,-1044.25 3544.62,-1044.25 3544.62,-965.75 3544.62,-965.75 3544.62,-959.75 3550.62,-953.75 3556.62,-953.75 3556.62,-953.75 3663.38,-953.75 3663.38,-953.75 3669.38,-953.75 3675.38,-959.75 3675.38,-965.75 3675.38,-965.75 3675.38,-1044.25 3675.38,-1044.25 3675.38,-1050.25 3669.38,-1056.25 3663.38,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"3610\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #138</text>\n",
       "<text text-anchor=\"middle\" x=\"3610\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">G1 &lt;= 2.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3610\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.053</text>\n",
       "<text text-anchor=\"middle\" x=\"3610\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 15</text>\n",
       "<text text-anchor=\"middle\" x=\"3610\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 1, 11]</text>\n",
       "<text text-anchor=\"middle\" x=\"3610\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 137&#45;&gt;138 -->\n",
       "<g id=\"edge138\" class=\"edge\">\n",
       "<title>137&#45;&gt;138</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3610,-1092.06C3610,-1084.21 3610,-1076.03 3610,-1067.96\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3613.5,-1068.2 3610,-1058.2 3606.5,-1068.2 3613.5,-1068.2\"/>\n",
       "</g>\n",
       "<!-- 151 -->\n",
       "<g id=\"node152\" class=\"node\">\n",
       "<title>151</title>\n",
       "<path fill=\"#de5dea\" stroke=\"black\" d=\"M4026.38,-1056.25C4026.38,-1056.25 3919.62,-1056.25 3919.62,-1056.25 3913.62,-1056.25 3907.62,-1050.25 3907.62,-1044.25 3907.62,-1044.25 3907.62,-965.75 3907.62,-965.75 3907.62,-959.75 3913.62,-953.75 3919.62,-953.75 3919.62,-953.75 4026.38,-953.75 4026.38,-953.75 4032.38,-953.75 4038.38,-959.75 4038.38,-965.75 4038.38,-965.75 4038.38,-1044.25 4038.38,-1044.25 4038.38,-1050.25 4032.38,-1056.25 4026.38,-1056.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-1038.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #151</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-1023.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">Pedu &lt;= 1.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-1007.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.619</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-991.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 13</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-975.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 11]</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-960.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 137&#45;&gt;151 -->\n",
       "<g id=\"edge151\" class=\"edge\">\n",
       "<title>137&#45;&gt;151</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3676.16,-1117.62C3738.34,-1094.24 3831.36,-1059.26 3896.66,-1034.71\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3897.75,-1038.03 3905.88,-1031.24 3895.29,-1031.48 3897.75,-1038.03\"/>\n",
       "</g>\n",
       "<!-- 139 -->\n",
       "<g id=\"node140\" class=\"node\">\n",
       "<title>139</title>\n",
       "<path fill=\"#ffffff\" stroke=\"black\" d=\"M3587,-917.75C3587,-917.75 3487,-917.75 3487,-917.75 3481,-917.75 3475,-911.75 3475,-905.75 3475,-905.75 3475,-827.25 3475,-827.25 3475,-821.25 3481,-815.25 3487,-815.25 3487,-815.25 3587,-815.25 3587,-815.25 3593,-815.25 3599,-821.25 3599,-827.25 3599,-827.25 3599,-905.75 3599,-905.75 3599,-911.75 3593,-917.75 3587,-917.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"3537\" y=\"-900.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #139</text>\n",
       "<text text-anchor=\"middle\" x=\"3537\" y=\"-884.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3537\" y=\"-868.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 1.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3537\" y=\"-853.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"3537\" y=\"-837.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"3537\" y=\"-821.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 138&#45;&gt;139 -->\n",
       "<g id=\"edge139\" class=\"edge\">\n",
       "<title>138&#45;&gt;139</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3583.02,-953.56C3578.59,-945.26 3573.95,-936.59 3569.4,-928.08\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3572.62,-926.69 3564.82,-919.52 3566.45,-929.99 3572.62,-926.69\"/>\n",
       "</g>\n",
       "<!-- 142 -->\n",
       "<g id=\"node143\" class=\"node\">\n",
       "<title>142</title>\n",
       "<path fill=\"#e374ed\" stroke=\"black\" d=\"M3736.75,-917.75C3736.75,-917.75 3629.25,-917.75 3629.25,-917.75 3623.25,-917.75 3617.25,-911.75 3617.25,-905.75 3617.25,-905.75 3617.25,-827.25 3617.25,-827.25 3617.25,-821.25 3623.25,-815.25 3629.25,-815.25 3629.25,-815.25 3736.75,-815.25 3736.75,-815.25 3742.75,-815.25 3748.75,-821.25 3748.75,-827.25 3748.75,-827.25 3748.75,-905.75 3748.75,-905.75 3748.75,-911.75 3742.75,-917.75 3736.75,-917.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"3683\" y=\"-900.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #142</text>\n",
       "<text text-anchor=\"middle\" x=\"3683\" y=\"-884.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">internet &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3683\" y=\"-868.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.779</text>\n",
       "<text text-anchor=\"middle\" x=\"3683\" y=\"-853.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 13</text>\n",
       "<text text-anchor=\"middle\" x=\"3683\" y=\"-837.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 3, 0, 10]</text>\n",
       "<text text-anchor=\"middle\" x=\"3683\" y=\"-821.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 138&#45;&gt;142 -->\n",
       "<g id=\"edge142\" class=\"edge\">\n",
       "<title>138&#45;&gt;142</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3636.98,-953.56C3641.41,-945.26 3646.05,-936.59 3650.6,-928.08\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3653.55,-929.99 3655.18,-919.52 3647.38,-926.69 3653.55,-929.99\"/>\n",
       "</g>\n",
       "<!-- 140 -->\n",
       "<g id=\"node141\" class=\"node\">\n",
       "<title>140</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M3447,-771.38C3447,-771.38 3347,-771.38 3347,-771.38 3341,-771.38 3335,-765.38 3335,-759.38 3335,-759.38 3335,-696.62 3335,-696.62 3335,-690.62 3341,-684.62 3347,-684.62 3347,-684.62 3447,-684.62 3447,-684.62 3453,-684.62 3459,-690.62 3459,-696.62 3459,-696.62 3459,-759.38 3459,-759.38 3459,-765.38 3453,-771.38 3447,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"3397\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #140</text>\n",
       "<text text-anchor=\"middle\" x=\"3397\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3397\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"3397\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"3397\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 139&#45;&gt;140 -->\n",
       "<g id=\"edge140\" class=\"edge\">\n",
       "<title>139&#45;&gt;140</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3485.27,-815.06C3473.37,-803.46 3460.71,-791.12 3448.81,-779.52\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3451.4,-777.15 3441.8,-772.68 3446.51,-782.16 3451.4,-777.15\"/>\n",
       "</g>\n",
       "<!-- 141 -->\n",
       "<g id=\"node142\" class=\"node\">\n",
       "<title>141</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M3589,-771.38C3589,-771.38 3489,-771.38 3489,-771.38 3483,-771.38 3477,-765.38 3477,-759.38 3477,-759.38 3477,-696.62 3477,-696.62 3477,-690.62 3483,-684.62 3489,-684.62 3489,-684.62 3589,-684.62 3589,-684.62 3595,-684.62 3601,-690.62 3601,-696.62 3601,-696.62 3601,-759.38 3601,-759.38 3601,-765.38 3595,-771.38 3589,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"3539\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #141</text>\n",
       "<text text-anchor=\"middle\" x=\"3539\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3539\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"3539\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"3539\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 139&#45;&gt;141 -->\n",
       "<g id=\"edge141\" class=\"edge\">\n",
       "<title>139&#45;&gt;141</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3537.74,-815.06C3537.89,-804.58 3538.06,-793.49 3538.21,-782.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3541.71,-783.18 3538.35,-773.13 3534.71,-783.08 3541.71,-783.18\"/>\n",
       "</g>\n",
       "<!-- 143 -->\n",
       "<g id=\"node144\" class=\"node\">\n",
       "<title>143</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M3731,-771.38C3731,-771.38 3631,-771.38 3631,-771.38 3625,-771.38 3619,-765.38 3619,-759.38 3619,-759.38 3619,-696.62 3619,-696.62 3619,-690.62 3625,-684.62 3631,-684.62 3631,-684.62 3731,-684.62 3731,-684.62 3737,-684.62 3743,-690.62 3743,-696.62 3743,-696.62 3743,-759.38 3743,-759.38 3743,-765.38 3737,-771.38 3731,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"3681\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #143</text>\n",
       "<text text-anchor=\"middle\" x=\"3681\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3681\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"3681\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"3681\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 142&#45;&gt;143 -->\n",
       "<g id=\"edge143\" class=\"edge\">\n",
       "<title>142&#45;&gt;143</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3682.26,-815.06C3682.11,-804.58 3681.94,-793.49 3681.79,-782.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3685.29,-783.08 3681.65,-773.13 3678.29,-783.18 3685.29,-783.08\"/>\n",
       "</g>\n",
       "<!-- 144 -->\n",
       "<g id=\"node145\" class=\"node\">\n",
       "<title>144</title>\n",
       "<path fill=\"#df61ea\" stroke=\"black\" d=\"M3880.75,-779.25C3880.75,-779.25 3773.25,-779.25 3773.25,-779.25 3767.25,-779.25 3761.25,-773.25 3761.25,-767.25 3761.25,-767.25 3761.25,-688.75 3761.25,-688.75 3761.25,-682.75 3767.25,-676.75 3773.25,-676.75 3773.25,-676.75 3880.75,-676.75 3880.75,-676.75 3886.75,-676.75 3892.75,-682.75 3892.75,-688.75 3892.75,-688.75 3892.75,-767.25 3892.75,-767.25 3892.75,-773.25 3886.75,-779.25 3880.75,-779.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"3827\" y=\"-761.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #144</text>\n",
       "<text text-anchor=\"middle\" x=\"3827\" y=\"-746.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">reason &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3827\" y=\"-730.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.65</text>\n",
       "<text text-anchor=\"middle\" x=\"3827\" y=\"-714.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 12</text>\n",
       "<text text-anchor=\"middle\" x=\"3827\" y=\"-698.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 2, 0, 10]</text>\n",
       "<text text-anchor=\"middle\" x=\"3827\" y=\"-683.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 142&#45;&gt;144 -->\n",
       "<g id=\"edge144\" class=\"edge\">\n",
       "<title>142&#45;&gt;144</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3736.21,-815.06C3745.73,-806.04 3755.71,-796.58 3765.43,-787.36\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3767.58,-790.15 3772.43,-780.73 3762.76,-785.07 3767.58,-790.15\"/>\n",
       "</g>\n",
       "<!-- 145 -->\n",
       "<g id=\"node146\" class=\"node\">\n",
       "<title>145</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M3806,-632.88C3806,-632.88 3706,-632.88 3706,-632.88 3700,-632.88 3694,-626.88 3694,-620.88 3694,-620.88 3694,-558.12 3694,-558.12 3694,-552.12 3700,-546.12 3706,-546.12 3706,-546.12 3806,-546.12 3806,-546.12 3812,-546.12 3818,-552.12 3818,-558.12 3818,-558.12 3818,-620.88 3818,-620.88 3818,-626.88 3812,-632.88 3806,-632.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"3756\" y=\"-615.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #145</text>\n",
       "<text text-anchor=\"middle\" x=\"3756\" y=\"-599.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3756\" y=\"-584.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 6</text>\n",
       "<text text-anchor=\"middle\" x=\"3756\" y=\"-568.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 6]</text>\n",
       "<text text-anchor=\"middle\" x=\"3756\" y=\"-552.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 144&#45;&gt;145 -->\n",
       "<g id=\"edge145\" class=\"edge\">\n",
       "<title>144&#45;&gt;145</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3800.76,-676.56C3795.08,-665.63 3789.05,-654.04 3783.32,-643.03\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3786.59,-641.72 3778.87,-634.46 3780.38,-644.95 3786.59,-641.72\"/>\n",
       "</g>\n",
       "<!-- 146 -->\n",
       "<g id=\"node147\" class=\"node\">\n",
       "<title>146</title>\n",
       "<path fill=\"#eb9cf2\" stroke=\"black\" d=\"M3948,-640.75C3948,-640.75 3848,-640.75 3848,-640.75 3842,-640.75 3836,-634.75 3836,-628.75 3836,-628.75 3836,-550.25 3836,-550.25 3836,-544.25 3842,-538.25 3848,-538.25 3848,-538.25 3948,-538.25 3948,-538.25 3954,-538.25 3960,-544.25 3960,-550.25 3960,-550.25 3960,-628.75 3960,-628.75 3960,-634.75 3954,-640.75 3948,-640.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"3898\" y=\"-623.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #146</text>\n",
       "<text text-anchor=\"middle\" x=\"3898\" y=\"-607.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">sex &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3898\" y=\"-591.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"3898\" y=\"-576.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 6</text>\n",
       "<text text-anchor=\"middle\" x=\"3898\" y=\"-560.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 2, 0, 4]</text>\n",
       "<text text-anchor=\"middle\" x=\"3898\" y=\"-544.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 144&#45;&gt;146 -->\n",
       "<g id=\"edge146\" class=\"edge\">\n",
       "<title>144&#45;&gt;146</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3853.24,-676.56C3857.5,-668.35 3861.97,-659.78 3866.35,-651.35\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3869.43,-653.02 3870.94,-642.53 3863.22,-649.79 3869.43,-653.02\"/>\n",
       "</g>\n",
       "<!-- 147 -->\n",
       "<g id=\"node148\" class=\"node\">\n",
       "<title>147</title>\n",
       "<path fill=\"#a3f29c\" stroke=\"black\" d=\"M3877,-502.25C3877,-502.25 3777,-502.25 3777,-502.25 3771,-502.25 3765,-496.25 3765,-490.25 3765,-490.25 3765,-411.75 3765,-411.75 3765,-405.75 3771,-399.75 3777,-399.75 3777,-399.75 3877,-399.75 3877,-399.75 3883,-399.75 3889,-405.75 3889,-411.75 3889,-411.75 3889,-490.25 3889,-490.25 3889,-496.25 3883,-502.25 3877,-502.25\"/>\n",
       "<text text-anchor=\"middle\" x=\"3827\" y=\"-484.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #147</text>\n",
       "<text text-anchor=\"middle\" x=\"3827\" y=\"-469.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">guardian &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3827\" y=\"-453.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"3827\" y=\"-437.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"3827\" y=\"-421.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 2, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"3827\" y=\"-406.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 146&#45;&gt;147 -->\n",
       "<g id=\"edge147\" class=\"edge\">\n",
       "<title>146&#45;&gt;147</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3871.76,-538.06C3867.5,-529.85 3863.03,-521.28 3858.65,-512.85\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3861.78,-511.29 3854.06,-504.03 3855.57,-514.52 3861.78,-511.29\"/>\n",
       "</g>\n",
       "<!-- 150 -->\n",
       "<g id=\"node151\" class=\"node\">\n",
       "<title>150</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M4019,-494.38C4019,-494.38 3919,-494.38 3919,-494.38 3913,-494.38 3907,-488.38 3907,-482.38 3907,-482.38 3907,-419.62 3907,-419.62 3907,-413.62 3913,-407.62 3919,-407.62 3919,-407.62 4019,-407.62 4019,-407.62 4025,-407.62 4031,-413.62 4031,-419.62 4031,-419.62 4031,-482.38 4031,-482.38 4031,-488.38 4025,-494.38 4019,-494.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"3969\" y=\"-477.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #150</text>\n",
       "<text text-anchor=\"middle\" x=\"3969\" y=\"-461.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3969\" y=\"-445.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"3969\" y=\"-429.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 3]</text>\n",
       "<text text-anchor=\"middle\" x=\"3969\" y=\"-414.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 146&#45;&gt;150 -->\n",
       "<g id=\"edge150\" class=\"edge\">\n",
       "<title>146&#45;&gt;150</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3924.24,-538.06C3929.92,-527.13 3935.95,-515.54 3941.68,-504.53\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3944.62,-506.45 3946.13,-495.96 3938.41,-503.22 3944.62,-506.45\"/>\n",
       "</g>\n",
       "<!-- 148 -->\n",
       "<g id=\"node149\" class=\"node\">\n",
       "<title>148</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M3806,-355.88C3806,-355.88 3706,-355.88 3706,-355.88 3700,-355.88 3694,-349.88 3694,-343.88 3694,-343.88 3694,-281.12 3694,-281.12 3694,-275.12 3700,-269.12 3706,-269.12 3706,-269.12 3806,-269.12 3806,-269.12 3812,-269.12 3818,-275.12 3818,-281.12 3818,-281.12 3818,-343.88 3818,-343.88 3818,-349.88 3812,-355.88 3806,-355.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"3756\" y=\"-338.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #148</text>\n",
       "<text text-anchor=\"middle\" x=\"3756\" y=\"-322.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3756\" y=\"-307.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"3756\" y=\"-291.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"3756\" y=\"-275.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 147&#45;&gt;148 -->\n",
       "<g id=\"edge148\" class=\"edge\">\n",
       "<title>147&#45;&gt;148</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3800.76,-399.56C3795.08,-388.63 3789.05,-377.04 3783.32,-366.03\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3786.59,-364.72 3778.87,-357.46 3780.38,-367.95 3786.59,-364.72\"/>\n",
       "</g>\n",
       "<!-- 149 -->\n",
       "<g id=\"node150\" class=\"node\">\n",
       "<title>149</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M3948,-355.88C3948,-355.88 3848,-355.88 3848,-355.88 3842,-355.88 3836,-349.88 3836,-343.88 3836,-343.88 3836,-281.12 3836,-281.12 3836,-275.12 3842,-269.12 3848,-269.12 3848,-269.12 3948,-269.12 3948,-269.12 3954,-269.12 3960,-275.12 3960,-281.12 3960,-281.12 3960,-343.88 3960,-343.88 3960,-349.88 3954,-355.88 3948,-355.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"3898\" y=\"-338.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #149</text>\n",
       "<text text-anchor=\"middle\" x=\"3898\" y=\"-322.82\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3898\" y=\"-307.07\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"3898\" y=\"-291.32\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 2, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"3898\" y=\"-275.57\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 147&#45;&gt;149 -->\n",
       "<g id=\"edge149\" class=\"edge\">\n",
       "<title>147&#45;&gt;149</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3853.24,-399.56C3858.92,-388.63 3864.95,-377.04 3870.68,-366.03\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3873.62,-367.95 3875.13,-357.46 3867.41,-364.72 3873.62,-367.95\"/>\n",
       "</g>\n",
       "<!-- 152 -->\n",
       "<g id=\"node153\" class=\"node\">\n",
       "<title>152</title>\n",
       "<path fill=\"#9ccef2\" stroke=\"black\" d=\"M4023,-917.75C4023,-917.75 3923,-917.75 3923,-917.75 3917,-917.75 3911,-911.75 3911,-905.75 3911,-905.75 3911,-827.25 3911,-827.25 3911,-821.25 3917,-815.25 3923,-815.25 3923,-815.25 4023,-815.25 4023,-815.25 4029,-815.25 4035,-821.25 4035,-827.25 4035,-827.25 4035,-905.75 4035,-905.75 4035,-911.75 4029,-917.75 4023,-917.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-900.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #152</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-884.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">paid &lt;= 0.5</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-868.95\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.918</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-853.2\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 3</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-837.45\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-821.7\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 151&#45;&gt;152 -->\n",
       "<g id=\"edge152\" class=\"edge\">\n",
       "<title>151&#45;&gt;152</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3973,-953.56C3973,-945.71 3973,-937.53 3973,-929.46\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3976.5,-929.7 3973,-919.7 3969.5,-929.7 3976.5,-929.7\"/>\n",
       "</g>\n",
       "<!-- 155 -->\n",
       "<g id=\"node156\" class=\"node\">\n",
       "<title>155</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M4172.75,-909.88C4172.75,-909.88 4065.25,-909.88 4065.25,-909.88 4059.25,-909.88 4053.25,-903.88 4053.25,-897.88 4053.25,-897.88 4053.25,-835.12 4053.25,-835.12 4053.25,-829.12 4059.25,-823.12 4065.25,-823.12 4065.25,-823.12 4172.75,-823.12 4172.75,-823.12 4178.75,-823.12 4184.75,-829.12 4184.75,-835.12 4184.75,-835.12 4184.75,-897.88 4184.75,-897.88 4184.75,-903.88 4178.75,-909.88 4172.75,-909.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"4119\" y=\"-892.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #155</text>\n",
       "<text text-anchor=\"middle\" x=\"4119\" y=\"-876.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"4119\" y=\"-861.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 10</text>\n",
       "<text text-anchor=\"middle\" x=\"4119\" y=\"-845.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 10]</text>\n",
       "<text text-anchor=\"middle\" x=\"4119\" y=\"-829.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 151&#45;&gt;155 -->\n",
       "<g id=\"edge155\" class=\"edge\">\n",
       "<title>151&#45;&gt;155</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M4026.95,-953.56C4039.48,-941.85 4052.81,-929.38 4065.32,-917.68\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"4067.39,-920.54 4072.31,-911.15 4062.61,-915.43 4067.39,-920.54\"/>\n",
       "</g>\n",
       "<!-- 153 -->\n",
       "<g id=\"node154\" class=\"node\">\n",
       "<title>153</title>\n",
       "<path fill=\"#d739e5\" stroke=\"black\" d=\"M4023,-771.38C4023,-771.38 3923,-771.38 3923,-771.38 3917,-771.38 3911,-765.38 3911,-759.38 3911,-759.38 3911,-696.62 3911,-696.62 3911,-690.62 3917,-684.62 3923,-684.62 3923,-684.62 4023,-684.62 4023,-684.62 4029,-684.62 4035,-690.62 4035,-696.62 4035,-696.62 4035,-759.38 4035,-759.38 4035,-765.38 4029,-771.38 4023,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #153</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 0, 1]</text>\n",
       "<text text-anchor=\"middle\" x=\"3973\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = excellent</text>\n",
       "</g>\n",
       "<!-- 152&#45;&gt;153 -->\n",
       "<g id=\"edge153\" class=\"edge\">\n",
       "<title>152&#45;&gt;153</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3973,-815.06C3973,-804.58 3973,-793.49 3973,-782.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3976.5,-783.13 3973,-773.13 3969.5,-783.13 3976.5,-783.13\"/>\n",
       "</g>\n",
       "<!-- 154 -->\n",
       "<g id=\"node155\" class=\"node\">\n",
       "<title>154</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M4165,-771.38C4165,-771.38 4065,-771.38 4065,-771.38 4059,-771.38 4053,-765.38 4053,-759.38 4053,-759.38 4053,-696.62 4053,-696.62 4053,-690.62 4059,-684.62 4065,-684.62 4065,-684.62 4165,-684.62 4165,-684.62 4171,-684.62 4177,-690.62 4177,-696.62 4177,-696.62 4177,-759.38 4177,-759.38 4177,-765.38 4171,-771.38 4165,-771.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"4115\" y=\"-754.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #154</text>\n",
       "<text text-anchor=\"middle\" x=\"4115\" y=\"-738.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"4115\" y=\"-722.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 2</text>\n",
       "<text text-anchor=\"middle\" x=\"4115\" y=\"-706.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 2, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"4115\" y=\"-691.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 152&#45;&gt;154 -->\n",
       "<g id=\"edge154\" class=\"edge\">\n",
       "<title>152&#45;&gt;154</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M4025.47,-815.06C4037.54,-803.46 4050.38,-791.12 4062.45,-779.52\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"4064.79,-782.12 4069.57,-772.67 4059.94,-777.07 4064.79,-782.12\"/>\n",
       "</g>\n",
       "<!-- 157 -->\n",
       "<g id=\"node158\" class=\"node\">\n",
       "<title>157</title>\n",
       "<path fill=\"#399de5\" stroke=\"black\" d=\"M3420,-1325.38C3420,-1325.38 3320,-1325.38 3320,-1325.38 3314,-1325.38 3308,-1319.38 3308,-1313.38 3308,-1313.38 3308,-1250.62 3308,-1250.62 3308,-1244.62 3314,-1238.62 3320,-1238.62 3320,-1238.62 3420,-1238.62 3420,-1238.62 3426,-1238.62 3432,-1244.62 3432,-1250.62 3432,-1250.62 3432,-1313.38 3432,-1313.38 3432,-1319.38 3426,-1325.38 3420,-1325.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"3370\" y=\"-1308.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #157</text>\n",
       "<text text-anchor=\"middle\" x=\"3370\" y=\"-1292.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3370\" y=\"-1276.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"3370\" y=\"-1260.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 0, 1, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"3370\" y=\"-1245.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = good</text>\n",
       "</g>\n",
       "<!-- 156&#45;&gt;157 -->\n",
       "<g id=\"edge157\" class=\"edge\">\n",
       "<title>156&#45;&gt;157</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3370,-1369.06C3370,-1358.58 3370,-1347.49 3370,-1336.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3373.5,-1337.13 3370,-1327.13 3366.5,-1337.13 3373.5,-1337.13\"/>\n",
       "</g>\n",
       "<!-- 158 -->\n",
       "<g id=\"node159\" class=\"node\">\n",
       "<title>158</title>\n",
       "<path fill=\"#47e539\" stroke=\"black\" d=\"M3562,-1325.38C3562,-1325.38 3462,-1325.38 3462,-1325.38 3456,-1325.38 3450,-1319.38 3450,-1313.38 3450,-1313.38 3450,-1250.62 3450,-1250.62 3450,-1244.62 3456,-1238.62 3462,-1238.62 3462,-1238.62 3562,-1238.62 3562,-1238.62 3568,-1238.62 3574,-1244.62 3574,-1250.62 3574,-1250.62 3574,-1313.38 3574,-1313.38 3574,-1319.38 3568,-1325.38 3562,-1325.38\"/>\n",
       "<text text-anchor=\"middle\" x=\"3512\" y=\"-1308.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">node #158</text>\n",
       "<text text-anchor=\"middle\" x=\"3512\" y=\"-1292.33\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">entropy = 0.0</text>\n",
       "<text text-anchor=\"middle\" x=\"3512\" y=\"-1276.58\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">samples = 1</text>\n",
       "<text text-anchor=\"middle\" x=\"3512\" y=\"-1260.83\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">value = [0, 1, 0, 0]</text>\n",
       "<text text-anchor=\"middle\" x=\"3512\" y=\"-1245.08\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\">class = medium</text>\n",
       "</g>\n",
       "<!-- 156&#45;&gt;158 -->\n",
       "<g id=\"edge158\" class=\"edge\">\n",
       "<title>156&#45;&gt;158</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M3422.47,-1369.06C3434.54,-1357.46 3447.38,-1345.12 3459.45,-1333.52\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"3461.79,-1336.12 3466.57,-1326.67 3456.94,-1331.07 3461.79,-1336.12\"/>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<graphviz.sources.Source at 0x1e79a178810>"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.tree import export_graphviz\n",
    "import graphviz\n",
    "\n",
    "img = export_graphviz(\n",
    "    dt_model,\n",
    "    out_file=None,  # 输出文件名\n",
    "    feature_names=stu_data.columns[:-1].values.tolist(),  # 传入特征名称\n",
    "    class_names=np.array([\"bad\", \"medium\", \"good\", \"excellent\"]),  # 传入类别值\n",
    "    filled=True,\n",
    "    node_ids=True,\n",
    "    rounded=True,\n",
    ")\n",
    "\n",
    "graphviz.Source(img)  # 展示决策树"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "60f912eb",
   "metadata": {},
   "source": [
    "**------以下是代码注释------**"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8f1429e3",
   "metadata": {},
   "source": [
    "让我详细解释一下这段代码的作用和各个参数的含义：\n",
    "\n",
    "这段代码的主要目的是将决策树模型可视化，将模型结构转换成一个可视化的图形。\n",
    "\n",
    "1. `export_graphviz()` 函数：\n",
    "这是 scikit-learn 提供的一个函数，用于将决策树模型转换为 DOT 格式的图形描述语言。主要参数说明：\n",
    "\n",
    "- `dt_model`: 训练好的决策树模型对象\n",
    "- `out_file=None`: \n",
    "  - 当设置为 None 时，返回 DOT 格式的字符串\n",
    "  - 如果指定文件名（如\"tree.dot\"），则会将 DOT 内容写入该文件\n",
    "- `feature_names=stu_data.columns[:-1].values.tolist()`: \n",
    "  - 特征名称列表\n",
    "  - 这里使用了数据集中除最后一列（标签）外的所有列名\n",
    "- `class_names=np.array([\"bad\", \"medium\", \"good\", \"excellent\"])`:\n",
    "  - 类别的名称\n",
    "  - 将数值类别 (0,1,2,3) 映射为有意义的字符串标签\n",
    "- `filled=True`: \n",
    "  - 节点是否使用颜色填充\n",
    "  - 不同类别的节点会使用不同的颜色\n",
    "- `node_ids=True`: \n",
    "  - 是否显示节点的编号\n",
    "  - 有助于理解树的结构\n",
    "- `rounded=True`: \n",
    "  - 节点是否使用圆角显示\n",
    "  - 使图形更美观\n",
    "\n",
    "2. `graphviz.Source(img)`：\n",
    "- 使用 graphviz 库将 DOT 格式的字符串转换为可视化图形\n",
    "- 在 Jupyter notebook 中可以直接显示\n",
    "- 图中展示了：\n",
    "  - 每个节点的决策条件\n",
    "  - 样本数量\n",
    "  - 类别分布\n",
    "  - 主要类别\n",
    "  - 熵值等信息\n",
    "\n",
    "这种可视化方法可以帮助我们：\n",
    "- 理解决策树的分支逻辑\n",
    "- 查看特征的重要性（靠近根节点的特征更重要）\n",
    "- 分析模型的复杂度\n",
    "- 判断是否存在过拟合\n",
    "\n",
    "注意：要使用这段代码，需要先安装 graphviz 包：\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7023de74",
   "metadata": {},
   "source": [
    "pip install graphviz  # Python包"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "afa002a1",
   "metadata": {},
   "source": [
    "同时还需要安装系统级的 Graphviz 软件：\n",
    "- Windows: 下载安装包\n",
    "- Mac: brew install graphviz\n",
    "- Linux: apt-get install graphviz"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "id": "9f14605a",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0, 1, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 0, 2, 0, 2, 3, 2, 2, 2, 2,\n",
       "       0, 2, 2, 2, 0, 0, 2, 2, 3, 3, 3, 3, 1, 3, 2, 2, 0, 3, 0, 0, 2, 2,\n",
       "       1, 2, 2, 2, 2, 2, 0, 3, 2, 2, 2, 3, 0, 2, 2, 1, 2, 3, 2, 2, 2, 2,\n",
       "       0, 0, 2, 2, 3, 1, 1, 2, 2, 2, 3, 0, 2, 0, 3, 0, 2, 1, 0, 1, 2, 1,\n",
       "       3, 2, 1, 1, 0, 2, 2, 0, 1, 3, 0, 3, 3, 2, 0, 2, 1, 2, 0, 2, 2, 2,\n",
       "       3, 2, 3, 0, 2, 3, 2, 0, 2])"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y_pred = dt_model.predict(X_test)  # 使用模型对测试集进行预测\n",
    "y_pred"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "id": "201582be",
   "metadata": {
    "lines_to_next_cell": 0
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.7058823529411765"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from sklearn.metrics import accuracy_score\n",
    "\n",
    "# 计算分类准确度\n",
    "accuracy_score(y_test, y_pred)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "08390404",
   "metadata": {},
   "source": [
    "##  19.14.  CART 决策树  # \n",
    "\n",
    "分类与回归树（classification and regression tree, CART）同样也是应用广泛的决策树学习算法，CART 算法是按照特征划分，由树的生成和树的剪枝构成，既可以进行分类又可以用于回归，按照作用将其分为决策树和回归树，由于本实验设计为决策树的概念，所以回归树的部分有兴趣的同学可以自己查找相关资料进一步学习。 \n",
    "\n",
    "CART决策树的构建和常见的 ID3 和 C4.5 算法的流程相似，但在特征划分选择上CART选择了 基尼指数 作为划分标准。数据集  $\\operatorname{D}$  的纯度可用基尼值来度量： \n",
    "\n",
    "$$ \\operatorname{Gini}(\\operatorname{D})=\\sum_{y=1}^{|y|} \\sum_{k^{\\prime} \\neq k} p_{k} p_{k^{\\prime}} \\tag{7} $$ \n",
    "\n",
    "基尼指数表示随机抽取两个样本，两个样本类别不一致的概率，基尼指数越小则数据集的纯度越高。同样对于每一个特征值的基尼指数计算，其和 ID3 、 C4.5 相似，定义为： \n",
    "\n",
    "$$ \\operatorname{GiniValue}(\\operatorname{D},a)=\\sum_{m=1}^{M}\\frac{\\left |\\operatorname{D}^{m} \\right |}{\\left |\\operatorname{D} \\right |}\\operatorname{Gini}(\\operatorname{D}^{m}) \\tag{8} $$ \n",
    "\n",
    "在进行特征划分的时候，选择特征中基尼值最小的作为最优特征划分点。 \n",
    "\n",
    "实际上，在应用过程中，更多的会使用 基尼指数 对特征划分点进行决策，最重要的原因是计算复杂度相较于 ID3 和 C4.5 小很多（没有对数运算）。 \n",
    "\n",
    "##  19.15.  总结  # \n",
    "\n",
    "本节实验中学习了决策树的原理和算法流程，采用数学公式和实际例子相结合的方式讲解了信息增益和增益率的特征划分方法。通过 Python 代码对决策树进行完整实现，并且使用 scikit-learn 对实际数据应用决策树进行分类预测。 \n",
    "\n",
    "相关链接 \n",
    "\n",
    "  * [ 决策树- 维基百科 ](https://zh.wikipedia.org/zh-hans/%E5%86%B3%E7%AD%96%E6%A0%91)\n"
   ]
  }
 ],
 "metadata": {
  "jupytext": {
   "cell_metadata_filter": "-all",
   "main_language": "python",
   "notebook_metadata_filter": "-all"
  },
  "kernelspec": {
   "display_name": ".venv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
